Documentation
JSFToolbox

Search 

Contents

  1. Introduction
  2. Getting Started
  3. Developing Web Sites
  4. Using Components
  5. Internationalization
  6. Code View Support
  7. Design View Support
  8. Keyboard Shortcuts
  9. Tag Object Toolbars
  10. JSF Server Behaviors
  11. Property Inspectors
Selected 12. JSF Tag Reference

12. JSF Tag Reference

Contents > JSF Tag Reference > JSF HTML Tags

10. JSF HTML Tag Reference

Contents > JSF HTML Tag Reference > h:message

h:message

The message tag renders a message for a specific component. You can customize the message generated by this component by applying different CSS styles to the message depending on its severity (eg. red for error, green for information) as well as the detail level of the message itself. You can also customize the standard error messages by overriding specific JSF properties in your message bundle.

Example:

<h:inputText id="username" required="#{true}" value="#{userBean.user.username}" errorStyle="color:red" />
<h:message for="username" />

HTML Output

<input type="text" id="form:username" name="form:username" value="" />
<span style="color:red">"username": Value is required.</span>

Tag Attributes

binding String
 
The value-binding expression linking this component tag to a backing bean property.
errorClass String
 
The errorClass attribute sets the CSS style class to apply to a message with a severity level of "ERROR".
errorStyle String
 
The errorStyle attribute sets the CSS style or styles to apply to a message with a severity level of "ERROR".
fatalClass String
 
The fatalClass attribute sets the CSS style class to apply to a message with a severity level of "FATAL".
fatalStyle String
 
The fatalStyle attribute sets the CSS style or styles to apply to a message with a severity level of "FATAL".
for String
Required
The for attribute is required and expects the component identifier of another component for which it should display a message.
id String
 
The unique identifier value for this component. The value must be unique within the closest naming container.
infoClass String
 
The infoClass attribute sets the CSS style class to apply to a message with a severity level of "INFO".
infoStyle String
 
The infoStyle attribute sets the CSS style or styles to apply to a message with a severity level of "INFO".
rendered String
 
A value-binding expression that evaluates to a Boolean condition indicating if this component should be rendered.
showDetail String
 
The showDetail attribute is a boolean flag indicating whether the detail part of the message should be included. The default value is "true".
showSummary String
 
The showSummary attribute is a boolean flag indicating whether the summary part of the message should be included. The default value is "false".
style String
 
The style attribute sets the CSS style definition to be applied to this component when it is rendered.
styleClass String
 
The styleClass attribute sets the CSS class to apply to this component when it is rendered.
title String
 
The title attribute is a standard HTML attribute that sets the tooltip text to display for the rendered component.
tooltip String
 
The tooltip attribute is a boolean flag indicating whether the detail part of the message should be displayed as a tooltip.
warnClass String
 
The warnClass attribute sets the CSS style class to apply to a message with a severity level of "WARN".
warnStyle String
 
The warnStyle attribute sets the CSS style or styles to apply to a message with a severity level of "WARN".