| |||||||
FRAMES NO FRAMES |
Render a single message for a specific component.
Set-up for Rendering
Obtain the "summary" and "detail" properties from UIMessage
component. If not present, keep the empty string as the value, respectively. Obtain the first FacesMessage
to render from the component, using the "for" property of the UIMessage
.
If the "for" property is set and not empty, the SearchExpressionHandler
must be used to resolve the associated component.
FacesMessage.SEVERITY_INFO
, the severity style comes from the value of the "infoStyle" attribute. If the severity of the message is FacesMessage.SEVERITY_WARN
, the severity style comes from the value of the "warnStyle" attribute, and so on for each of the severities, INFO, WARN, ERROR
and FATAL
. The same rules apply for obtaining the severity style class, but instead of "infoStyle, warnStyle", etc use "infoClass, warnClass", etc. Obtain the "style", "styleClass" and "layout" attributes from the UIMessage
component. If we have a "style" attribute and a severity style attribute, use the severity style attribute as the value of the "style" attribute. If we have no "style" attribute, but do have a severity style, use the severity style as the value of the "style" attribute. The same precedence rules apply for the style class. Obtain the value of the dir
and lang
attributes. Rendering
For the message renderer, we only render one row, for the first message. For the messages renderer, we render as many rows as we have messages. If any of the "dir", "lang", "style" or "styleClass" attributes has a non-null value (as determined above), render a "span" element, outputting the value of the "style" attribute as the the value of the "style" attribute, and outputting the value of the "styleClass" attribute as the value of the "class" attribute on the "span" element. Output the "dir" and "lang" attributes as well, if they are present. If the UIMessage
has a "tooltip" attribute with the value of "true", and we haven't already written out the "span" and the "title" attribute for the "span", output the "detail" as the value of the "title" attribute on the "span". If we haven't already written out a "title" attribute, and there is no detail, output the "summary" as the value of the "title" attribute. Close out the span if necessary.
Tag Information | |
Tag Class | .MessageTag |
TagExtraInfo Class | None |
Body Content | JSP |
Display Name | None |
Attributes | ||||
Name | Required | Request-time | Type | Description |
for | true | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Search expression to the component for which to display messages. |
id | false | true | java.lang.String | The component identifier for this component. This value must be unique within the closest parent component that is a naming container. |
rendered | false | false | javax.el.ValueExpression
(must evaluate to boolean )
| Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit. The default value for this property is true. |
showDetail | false | false | javax.el.ValueExpression
(must evaluate to boolean )
| Flag indicating whether the detail portion of displayed messages should be included. Default value is "true". |
showSummary | false | false | javax.el.ValueExpression
(must evaluate to boolean )
| Flag indicating whether the summary portion of displayed messages should be included. Default value is "false". |
dir | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have the correct case. |
errorClass | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| CSS style class to apply to any message with a severity class of "ERROR". |
errorStyle | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| CSS style(s) to apply to any message with a severity class of "ERROR". |
fatalClass | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| CSS style class to apply to any message with a severity class of "FATAL". |
fatalStyle | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| CSS style(s) to apply to any message with a severity class of "FATAL". |
infoClass | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| CSS style class to apply to any message with a severity class of "INFO". |
infoStyle | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| CSS style(s) to apply to any message with a severity class of "INFO". |
lang | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Code describing the language used in the generated markup for this component. |
role | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs to. It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value of this attribute. |
style | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| CSS style(s) to be applied when this component is rendered. |
styleClass | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be passed through as the "class" attribute on generated markup. |
title | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Advisory title information about markup elements generated for this component. |
tooltip | false | false | javax.el.ValueExpression
(must evaluate to boolean )
| Flag indicating whether the detail portion of the message should be displayed as a tooltip. |
warnClass | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| CSS style class to apply to any message with a severity class of "WARN". |
warnStyle | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| CSS style(s) to apply to any message with a severity class of "WARN". |
binding | false | false | javax.el.ValueExpression
(must evaluate to javax.faces.component.UIComponent )
| The ValueExpression linking this component to a property in a backing bean |
Variables | No Variables Defined. |
| |||||||
FRAMES NO FRAMES |