public class Message
An object of communication that provides text information. For example, a validation message may inform a web
application user a business rule was violated. A message can be associated with a particular source element or
component, has text providing the basis for communication, and has severity indicating the priority or intensity of
the message for its receiver.
public Message(java.lang.Object source,
Creates a new message.
source - the source of the message
text - the message text
severity - the message severity
public java.lang.Object getSource()
A reference to the source element this message is associated with. This could be a field on a form in UI, or null
(or empty "" in the case of global bean validation) if the message is not associated with a any particular
public java.lang.String getText()
The message text. The text is the message's communication payload.