Name

<h:message>

Synopsis

This action represents an instance of the component type registered with the type ID javax.faces.HtmlMessage (by default, an instance of the javax.faces.component.html.HtmlMessage class), combined with a renderer registered with the renderer type ID javax.faces.Message.

The component gets the first message queued for the component identified by the for attribute. The message properties identified by the showDetail and showSummary attributes for this message are rendered as text, within an HTML <span> element if any of the CSS style attributes apply or the id attribute is set. If the tooltip attribute is set to true and both the summary and the detailed text are rendered, the message summary is rendered as the value of the <span> element’s title attribute.

Syntax

<h:message for="componentId"
  [id="id"] [binding="componentBinding"] [rendered="true|false"]
  [showDetail="true|false"] [showSummary="true|false"] [tooltip="true|false"]
  [errorClass="styleClass"] [errorStyle="style"]
  [fatalClass="styleClass"] [fatalStyle="style"]
  [infoClass="styleClass"] [infoStyle="style"]
  [warnClass="styleClass"] [warnStyle="style"]
  <!-- HTML attributes -->
  [style="style"] [styleClass="styleClass"] [title="title"]
/>

Attributes

Attribute name

Java type

EL expression type

Description

binding
String

VB

Must be a value binding expression for a property the component is bound to.

errorClass
String

Any

One or more space-separated CSS class names used as a <span> element’s class ...

Get JavaServer Faces now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.