|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.application.FacesMessage
public class FacesMessage
see Javadoc of JSF Specification
FacesMessage represents a single validation (or other) message, which is typically associated with a
particular component in the view. A FacesMessage instance may be created based on a specific messageId. The
specification defines the set of messageIds for which there must be FacesMessage instances.
Application.getMessageBundle(). If non-null, locate the named ResourceBundle, using
the Locale from the current and see if it has a value for the argument
messageId. If it does, treat the value as the summary of the FacesMessage. If it
does not, or if Application.getMessageBundle() returned null, look in the ResourceBundle named by the value
of the constant FACES_MESSAGES and see if it has a value 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.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.summary and detail of the FacesMessage
.
| Nested Class Summary | |
|---|---|
static class |
FacesMessage.Severity
|
| Field Summary | |
|---|---|
static String |
FACES_MESSAGES
ResourceBundle identifier for messages whose message identifiers are defined in the JavaServer Faces
specification. |
static FacesMessage.Severity |
SEVERITY_ERROR
Message severity level indicating that an error has occurred. |
static FacesMessage.Severity |
SEVERITY_FATAL
Message severity level indicating that a serious error has occurred. |
static FacesMessage.Severity |
SEVERITY_INFO
Message severity level indicating an informational message rather than an error. |
static FacesMessage.Severity |
SEVERITY_WARN
Message severity level indicating that an error might have occurred. |
static List |
VALUES
Immutable Lis of valid FacesMessage.Severityinstances, in ascending order of their ordinal
value. |
static Map |
VALUES_MAP
Immutable Map of valid FacesMessage.Severityinstances, keyed by name. |
| Constructor Summary | |
|---|---|
FacesMessage()
Construct a new FacesMessage with no initial values. |
|
FacesMessage(FacesMessage.Severity severity,
String summary,
String detail)
Construct a new FacesMessagewith the specified initial values. |
|
FacesMessage(String summary)
Construct a new FacesMessage with just a summary. |
|
FacesMessage(String summary,
String detail)
Construct a new FacesMessage with the specified initial values. |
|
| Method Summary | |
|---|---|
String |
getDetail()
|
FacesMessage.Severity |
getSeverity()
|
String |
getSummary()
Return the localized summary text. |
boolean |
isRendered()
|
void |
rendered()
|
void |
setDetail(String detail)
Set the localized detail text. |
void |
setSeverity(FacesMessage.Severity severity)
Return the severity level. |
void |
setSummary(String summary)
Set the localized summary text. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FACES_MESSAGES
ResourceBundle identifier for messages whose message identifiers are defined in the JavaServer Faces
specification.
public static final FacesMessage.Severity SEVERITY_INFO
public static final FacesMessage.Severity SEVERITY_WARN
public static final FacesMessage.Severity SEVERITY_ERROR
public static final FacesMessage.Severity SEVERITY_FATAL
public static final List VALUES
Lis of valid FacesMessage.Severityinstances, in ascending order of their ordinal
value.
public static final Map VALUES_MAP
Map of valid FacesMessage.Severityinstances, keyed by name.
| Constructor Detail |
|---|
public FacesMessage()
FacesMessage with no initial values. The severity is set to Severity.INFO.
public FacesMessage(String summary)
FacesMessage with just a summary. The detail is null, the severity is set to
Severity.INFO.
public FacesMessage(String summary,
String detail)
FacesMessage with the specified initial values. The severity is set to Severity.INFO.
summary - - Localized summary message textdetail - - Localized detail message text
public FacesMessage(FacesMessage.Severity severity,
String summary,
String detail)
FacesMessagewith the specified initial values.
severity - - the severitysummary - - Localized summary message textdetail - - Localized detail message text| Method Detail |
|---|
public FacesMessage.Severity getSeverity()
public void setSeverity(FacesMessage.Severity severity)
public String getSummary()
public void setSummary(String summary)
summary - - The new localized summary textpublic String getDetail()
public void setDetail(String detail)
detail - - The new localized detail textpublic boolean isRendered()
public void rendered()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||