88
JSF <h:message> Tag
It is used to display a single message for a particular component. You can display your custom message by passing id of that component into the for attribute.
Tag Attributes
Attribute | Description |
---|---|
for | It is mandatory tag which is used to assign component’s id, for that message is composed. |
errorClass | It is used to apply CSS style class to any message with a severity class of “ERROR”. |
errorStyle | It is used to apply CSS style to any message with a severity class of “ERROR”. |
fatalClass | It is used to apply CSS style class to any message with a severity class of “FATAL”. |
FatalStyle | It is used to apply CSS style to any message with a severity class of “FATAL”. |
infoClass | It is used to apply CSS style class to any message with a severity class of “INFO”. |
InfoStyle | It is used to apply CSS style to any message with a severity class of “INFO”. |
tooltip | It is used to display detail portion of the message as a tooltip. |
warnClass | It is used to apply CSS style class to any message with a severity class of “WARN”. |
warnStyle | It is used to apply CSS style to any message with a severity class of “WARN”. |
Example
// index.xhtml
// User.java
Output:
Next TopicJSF <h:messages>