FacesMessage represents a single validation (or other) message, which is typically associated with a particular component in the view. A {@link javax.faces.application.FacesMessage} instance may be createdbased on a specific messageId
. The specification defines the set of messageId
s for which there must be {@link javax.faces.application.FacesMessage} instances.
The implementation must take the following steps when creating FacesMessage
instances given a messageId
:
Call {@link Application#getMessageBundle}. If non-null
, locate the named ResourceBundle
, using the Locale
from the current {@link javax.faces.component.UIViewRoot} and see if it has a value for theargument messageId
. If it does, treat the value as the summary
of the FacesMessage
. If it does not, or if {@link Application#getMessageBundle} returnednull
, look in the ResourceBundle
named by the value of the constant {@link #FACES_MESSAGES} and see if it has avalue for the argument messageId
. If it does, treat the value as the summary
of the FacesMessage
. If it does not, there is no initialization information for the FacesMessage
instance.
In all cases, if a ResourceBundle
hit is found for the {messageId}
, look for further hits under the key {messageId}_detail
. Use this value, if present, as the detail
for the returned FacesMessage
.
Make sure to perform any parameter substitution required for the summary
and detail
of the FacesMessage
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|