Class Hierarchy All Classes All Fields and Methods
Class javax.faces.component.UIMessage
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase javax.faces.component.UIMessagepublic class UIMessage
extends UIComponentBase
This component is responsible for displaying messages for a specific UIComponent, identified by a clientId. The component obtains the messages from the FacesContext.
By default, the rendererType property must be set to "javax.faces.Message". This value can be changed by calling the setRendererType() method.
Field Index Field Description COMPONENT_FAMILY The standard component family for this component. COMPONENT_TYPE The standard component type for this component.
Constructor Index Constructor Description UIMessage() Create a new UIMessage instance with default property values.
Method Index Method Description String getFamily() String getFor() Return the client identifier of the component for which this component represents associated message(s) (if any). boolean isShowDetail() Return the flag indicating whether the detail property of the associated message(s) should be displayed. boolean isShowSummary() Return the flag indicating whether the summary property of the associated message(s) should be displayed. void restoreState(FacesContext, Object) Object saveState(FacesContext) void setFor(String) Set the client identifier of the component for which this component represents associated message(s) (if any). void setShowDetail(boolean) Set the flag indicating whether the detail property of the associated message(s) should be displayed. void setShowSummary(boolean) Set the flag indicating whether the summary property of the associated message(s) should be displayed.
Fields
COMPONENT_FAMILY
public static final java.lang.String COMPONENT_FAMILY
The standard component family for this component.
COMPONENT_TYPE
public static final java.lang.String COMPONENT_TYPE
The standard component type for this component.
Constructors
UIMessage
public UIMessage()
Create a new UIMessage instance with default property values.
Methods
getFamily
public String getFamily()
getFor
public String getFor()
Return the client identifier of the component for which this component represents associated message(s) (if any).
isShowDetail
public boolean isShowDetail()
Return the flag indicating whether the detail property of the associated message(s) should be displayed. Defaults to false.
isShowSummary
public boolean isShowSummary()
Return the flag indicating whether the summary property of the associated message(s) should be displayed. Defaults to true.
restoreState
public void restoreState(FacesContext context, Object state)
saveState
public Object saveState(FacesContext context)
setFor
public void setFor(String newFor)
Set the client identifier of the component for which this component represents associated message(s) (if any). This property must be set before the message is displayed.
- Parameters
- newFor - The new client id
setShowDetail
public void setShowDetail(boolean showDetail)
Set the flag indicating whether the detail property of the associated message(s) should be displayed.
- Parameters
- showDetail - The new flag
setShowSummary
public void setShowSummary(boolean showSummary)
Set the flag indicating whether the summary property of the associated message(s) should be displayed.
- Parameters
- showSummary - The new flag value
Class Hierarchy All Classes All Fields and Methods