JBoss.orgCommunity Documentation
The component is used for rendering a single message for a specific component.
Consists of two parts to be defined optionally: marker (pictogram) and label (text message)
Provides set of facets for marker customization
Supports tooltip to display extra portion of message
Tracks both traditional and Ajax requests
Customizable look and feel
The component has the same behavior as standard <h:message> component. Besides some extra features:
auto rerendering after Ajax request without help of <a4j:outputPanel>;
providing passed
message after validation has been passed (optional);
possibility to add marker to a message;
set of predefined CSS classes for customizing messages appearance.
The <rich:message> appears on page after form is submitted. Even for "passed" state. The "passedLabel" attribute is used for definition of the label when validation is passed. Boolean attribute "showSummary" defines possibility to display summary portion of displayed messages.
<rich:message for="id" passedLabel="No errors" showSummary="true">
<f:facet name="errorMarker">
<h:graphicImage url="/image/error.png"/>
</f:facet>
<f:facet name="passedMarker">
<h:graphicImage url="/image/passed.png"/>
</f:facet>
</rich:message>
Table of <rich:message> attributes.
Table 6.254. Component Identification Parameters
Name | Value |
---|---|
component-type | org.richfaces.component.RichMessage |
component-class | org.richfaces.component.html.HtmlRichMessage |
component-family | org.richfaces.component.RichMessage |
renderer-type | org.richfaces.RichMessageRenderer |
tag-class | org.richfaces.taglib.RichMessageTag |
Table 6.255. Facets
Facet | Description |
---|---|
errorMarker | Defines pictogram for message with error severity class |
fatalMarker | Defines pictogram for message with fatal severity class |
infoMarker | Defines pictogram for message with info severity class |
passedMarker | Defines pictogram if there is no fatal, error, warn or info message |
warnMarker | Defines pictogram for message with warn severity class |
Table 6.256. Classes names that define a component appearance
Class name | Description |
---|---|
rich-message | Defines styles for a wrapper element |
rich-message-marker | Defines styles for a marker |
rich-message-label | Defines styles for a label |
You can find all necessary information about style classes redefinition in Definition of Custom Style Classes section.
Visit the Message page at RichFaces LiveDemo for examples of component usage and their sources.