UI-Component Sets
Project Documentation

Summary

Tag name: <h:message>
UIComponent class: javax.faces.component.html.HtmlMessage
Tag class: org.apache.myfaces.taglib.html.HtmlMessageTag
Component type: javax.faces.HtmlMessage
Component family: javax.faces.Message
Renderer type: javax.faces.Message
Renderer class: org.apache.myfaces.renderkit.html.HtmlMessageRenderer

Renders the first FacesMessage that is assigned to the component referenced by the "for" attribute.

Unless otherwise specified, all attributes accept static values or EL expressions.

See Javadoc of JSF Specification

Attributes

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".
for String Yes An EL expression, returning a String, with the unique ID of the component for which messages should be displayed. This string has the same format as that accepted by the UIComponent.findComponent() method.
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".
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".