Summary
Tag name: <h:messages>
UIComponent class: javax.faces.component.html.HtmlMessages
Tag class: org.apache.myfaces.taglib.html.HtmlMessagesTag
Component type: javax.faces.HtmlMessages
Component family: javax.faces.Messages
Renderer type: javax.faces.Messages
Renderer class: org.apache.myfaces.renderkit.html.HtmlMessagesRenderer
Renders all or some FacesMessages depending on the "for" and
"globalOnly" attributes.
The behaviour of this component is:
- If globalOnly = true, only global messages, that have no associated clientId, will be displayed.
- else if there is a "for" attribute, only messages that are assigned to the component referenced by the "for" attribute are displayed.
- else all messages are displayed.
Unless otherwise specified, all attributes accept static values or EL expressions.
See Javadoc of JSF SpecificationAttributes
Name | Type | Supports EL? | Description |
---|---|---|---|
binding | String | Only EL | Identifies a backing bean property (of type UIComponent or appropriate subclass) to bind to this component instance. This value must be an EL expression. |
errorClass | String | Yes | CSS class to be used for messages with severity "ERROR". |
errorStyle | String | Yes | CSS style to be used for messages with severity "ERROR". |
fatalClass | String | Yes | CSS class to be used for messages with severity "FATAL". |
fatalStyle | String | Yes | CSS style to be used for messages with severity "FATAL". |
globalOnly | boolean | Yes | A boolean value that controls whether global messages (those without IDs) should be displayed. Default: false. |
id | String | Yes | An identifier for this particular component instance within
a component view.
The id must be unique within the scope of the tag's enclosing NamingContainer (eg h:form or f:subview). The id is not necessarily unique across all components in the current view This value must be a static value, ie not change over the lifetime of a component. It cannot be defined via an EL expression; only a string is permitted. |
infoClass | String | Yes | CSS class to be used for messages with severity "INFO". |
infoStyle | String | Yes | CSS style to be used for messages with severity "INFO". |
layout | String | Yes | The layout: "table" or "list". Default: list |
rendered | boolean | Yes | A boolean value that indicates whether this component should be rendered. Default value: true. |
showDetail | boolean | Yes | An EL expression, returning a boolean, that controls whether the detail text of the associated messages is displayed. Default: false. |
showSummary | boolean | Yes | An EL expression, returning a boolean, that controls whether the summary text of the associated messages is displayed. Default: true. |
style | String | Yes | HTML: CSS styling instructions. |
styleClass | String | Yes | The CSS class for this element. Corresponds to the HTML 'class' attribute. |
title | String | Yes | HTML: An advisory title for this element. Often used by the user agent as a tooltip. |
tooltip | boolean | Yes | If true, the message summary will be rendered as a tooltip (i.e. HTML title attribute). |
warnClass | String | Yes | CSS class to be used for messages with severity "WARN". |
warnStyle | String | Yes | CSS style to be used for messages with severity "WARN". |