java.lang.Object
org.omnifaces.util.Messages.Message
- Enclosing class:
- Messages
Faces message builder.
- Since:
- 1.1
- Author:
- Bauke Scholtz
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd()Add the current message as a global message.voidAdd the current message for the given client ID.Returns the so far built message as aConverterException.Returns the so far built message as aValidatorException.Set the detail message of the current message.error()Set the severity of the current message to ERROR.fatal()Set the severity of the current message to FATAL.flash()Make the current message a flash message.get()Returns the so far built message.voidThrows the so far built message as aConverterException.voidThrows the so far built message as aValidatorException.warn()Set the severity of the current message to WARN.
-
Method Details
-
detail
Set the detail message of the current message.- Parameters:
detail- The detail message to be set on the current message.params- The detail message format parameters, if any.- Returns:
- The current
Messages.Messageinstance for further building. - See Also:
-
warn
Set the severity of the current message to WARN. Note: it defaults to INFO already.- Returns:
- The current
Messages.Messageinstance for further building. - See Also:
-
error
Set the severity of the current message to ERROR. Note: it defaults to INFO already.- Returns:
- The current
Messages.Messageinstance for further building. - See Also:
-
fatal
Set the severity of the current message to FATAL. Note: it defaults to INFO already.- Returns:
- The current
Messages.Messageinstance for further building. - See Also:
-
flash
Make the current message a flash message. Use this when you need to display the message after a redirect.- Returns:
- The current
Messages.Messageinstance for further building. - See Also:
-
add
Add the current message for the given client ID.- Parameters:
clientId- The client ID to add the current message for.- See Also:
-
add
public void add()Add the current message as a global message. -
get
Returns the so far built message.- Returns:
- The so far built message.
-
asConverterException
Returns the so far built message as aConverterException.- Returns:
- The so far built message as a
ConverterException. - Since:
- 3.8
-
asValidatorException
Returns the so far built message as aValidatorException.- Returns:
- The so far built message as a
ValidatorException. - Since:
- 3.8
-
throwConverterException
public void throwConverterException()Throws the so far built message as aConverterException.- Throws:
ConverterException- The so far built message as aConverterException.- Since:
- 3.5
-
throwValidatorException
public void throwValidatorException()Throws the so far built message as aValidatorException.- Throws:
ValidatorException- The so far built message as aValidatorException.- Since:
- 3.5
-