All Downloads are FREE. Search and download functionalities are using the official Maven repository.

facesdoc.HTML_BASIC.javax.faces.Messagejavax.faces.Message.html Maven / Gradle / Ivy

Go to download

This is the master POM file for Oracle's Implementation of the JSF 2.3 Specification.

There is a newer version: 2.3-pfd
Show newest version




<font size="-1">component-family:</font> javax.faces.Message <font size="-1">renderer-type:</font> javax.faces.Message






HTML_BASIC render-kit
component-family: javax.faces.Message renderer-type: javax.faces.Message


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. This will be the only message we render. Obtain the severity style for this message. If the severity of the message is 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 the UIMessage has "showSummary" and "showDetail" properties with the value "true", if we haven't already written out the "span", output the "summary" as the value of the "title" attribute on the "span". If we haven't already written out a "title" attribute, and "showSummary" is true, output the summary. If "showDetail" is true, output the detail. Close out the span if necessary.

This renderer is responsible for rendering its children.


Note:

Attributes with a pass-through value of true are not interpreted by the renderer and are passed straight through to the rendered markup, without checking for validity. Attributes with a pass-through value of false are interpreted by the renderer, and may or may not be checked for validity by the renderer.

Attributes
attribute-name pass-through attribute-class description default-value
 dir true java.lang.String Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). undefined
 errorClass false java.lang.String CSS style class to apply to any message with a severity class of "ERROR". undefined
 errorStyle false java.lang.String CSS style(s) to apply to any message with a severity class of "ERROR". undefined
 fatalClass false java.lang.String CSS style class to apply to any message with a severity class of "FATAL". undefined
 fatalStyle false java.lang.String CSS style(s) to apply to any message with a severity class of "FATAL". undefined
 infoClass false java.lang.String CSS style class to apply to any message with a severity class of "INFO". undefined
 infoStyle false java.lang.String CSS style(s) to apply to any message with a severity class of "INFO". undefined
 lang true java.lang.String Code describing the language used in the generated markup for this component. undefined
 style true java.lang.String CSS style(s) to be applied when this component is rendered. undefined
 styleClass false 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. undefined
 title true java.lang.String Advisory title information about markup elements generated for this component. undefined
 tooltip false boolean Flag indicating whether the detail portion of the message should be displayed as a tooltip. undefined
 warnClass false java.lang.String CSS style class to apply to any message with a severity class of "WARN". undefined
 warnStyle false java.lang.String CSS style(s) to apply to any message with a severity class of "WARN". undefined

Copyright (c) 2003-2010 Oracle America, Inc. All Rights Reserved.




© 2015 - 2024 Weber Informatics LLC | Privacy Policy