75
RichFaces <rich:message>
This component is used to render a message. We can customize apppearance of this message. The tool-tip attrubute is used to provide further information about the message.
This component is same as the JSF <h:message> with some additional attributes.
Style classes and skin parameters
Class (selector) | Class (selector) Function | Skin Parameters | Mapped CSS properties |
---|---|---|---|
.rf-msg | It is used to define styles for the message itself. | generalFamilyFont generalSizeFont | font-family font-size |
.rf-msg-err | It is used to define styles for an error message. | errorColor | color |
.rf-msg-ftl | It is used to define styles for a fatal message. | errorColor | color |
.rf-msg-inf | It is used to define styles for an information message. | generalTextColor | color |
.rf-msg-wrn | It is used to define styles for a warning message. | warningTextColor | color |
.rf-msg-ok | It is used to define styles for a basic OK message. | generalTextColor | color |
.rf-msg-sum, .rf-msg-det | These classes define styles for the summary or details of a message. | No skin parameters. |
Example
Here, in the following example, we are implementing <rich:message> component. This example contains the following files.
JSF File
// rich-message.xhtml
Managed Bean
// User.java
Output:
Next TopicRichFaces <rich:messages>