Home » RichFaces Rich:Messages

RichFaces Rich:Messages

by Online Tutorials Library

RichFaces <rich:messages>

This component works similar to the <rich:message> component and automatically rendered after an Ajax request. It is used to display all the validation messages of the current web page collectively.

It doesn’t require any extra attributes for basic usage. To limit the messages to a specific component, we can use the for attribute to refer the component.

Style classes and skin parameters

The following table contains the style classes and corresponding skin parameters for the messages.

Class (selector)FunctionSkin ParametersMapped CSS properties
.rf-msgsIt is used to define styles for the message itself.generalFamilyFont generalSizeFontfont-family font-size
.rf-msgs-errIt is used to define styles for an error message.errorColorcolor
.rf-msgs-ftlIt is used to define styles for a fatal message.errorColorcolor/td>
.rf-msgs-infIt is used to define styles for an information message.generalTextColorcolor
.rf-msgs-wrnIt is used to define styles for a warning message.warningTextColorcolor
.rf-msgs-okIt is used to define styles for a basic OK message.generalTextColorcolor
.rf-msgs-sum, .rf-msgs-detThese classes define styles for the summary or details of a message.No skin parameters.


Here, in the following example, we are implementing <rich:messages> component. This example contains the following files.

JSF File

// rich-messages.xhtml

Managed Bean

// User.java


RichFaces Messages 1

You may also like