Create new RichFaces Documentation Jira issue

This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.orgCommunity Documentation

6.14.7.  < rich:message > available since 3.1.0

Table 6.587. rich : message attributes

Attribute Name Description
ajaxRenderedDefine, must be (or not) content of this component will be included in AJAX response created by parent AJAX Container, even if not forced by reRender list of ajax action. Ignored if component marked to output by some Ajax action component. The default value is "true".
binding JSF: The attribute takes a value-binding expression for a component property of a backing bean
errorClassAssigns one or more space-separated CSS class names to the message with a severity class of "ERROR"
errorLabelClassAssigns one or more space-separated CSS class names to the message label with a severity class of "ERROR"
errorMarkerClassAssigns one or more space-separated CSS class names to the message marker with a severity class of "ERROR"
fatalClassAssigns one or more space-separated CSS class names to the message with a severity class of "FATAL"
fatalLabelClassAssigns one or more space-separated CSS class names to the message label with a severity class of "FATAL"
fatalMarkerClassAssigns one or more space-separated CSS class names to the message marker with a severity class of "FATAL"
forClient identifier of the component for which to display messages
id JSF: Every component may have a unique id that is automatically created if omitted
infoClassAssigns one or more space-separated CSS class names to the message with a severity class of "INFO"
infoLabelClassAssigns one or more space-separated CSS class names to the message label with a severity class of "INFO"
infoMarkerClassAssigns one or more space-separated CSS class names to the message marker with a severity class of "INFO"
labelClassAssigns one or more space-separated CSS class names to the message label
levelDefines a comma-separated list of messages categories to display. Default value is "ALL".
markerClassAssigns one or more space-separated CSS class names to the message marker
markerStyleCSS style rules to be applied to the message marker
minLevelDefines a minimum level of messages categories to display.
rendered JSF: If "false", this component is not rendered
showDetailFlag indicating whether detailed information of a displayed messages should be included. Default value is "true".
showSummaryFlag indicating whether the summary portion of displayed messages should be included. Default value is "false".
styleHTML: CSS style rules to be applied to the component
styleClass JSF: Assigns one or more space-separated CSS class names to the component. Corresponds to the HTML "class" attribute.
titleHTML: Advisory title information about markup elements generated for this component
tooltipFlag indicating whether the detail portion of the message should be displayed as a tooltip. Default value is "false".
warnClassAssigns one or more space-separated CSS class names to the message with a severity class of "WARN"
warnLabelClassAssigns one or more space-separated CSS class names to the message label with a severity class of "WARN"
warnMarkerClassAssigns one or more space-separated CSS class names to the message marker with a severity class ofS "WARN"


The component has the same behavior as standard <h:message> component except next two features:

A set of facets which can be used for marker defining:

The following example shows different variants for component customization. The attribute "passedLabel" is used for definition of the label to display when no message appears. But the message component doesn't appear before the form submission even when state is defined as passed (on initial rendering). Boolean attribute "showSummary" defines possibility to display summary portion of displayed messages. The facets "errorMarker" and "passedMarker" set corresponding images for markers.

Example:


...
<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>     
...

On the component LiveDemo page you can see the example of <rich:message> usage and sources for the given example.