The standard HTML RenderKit. Please see the spec for additional details for the standard render-kit.
General notes on decoding
Only Renderers for components which cause data to sent to the
server on a page submit need to implement decode behavior. In
practical terms, this means Renderers for components that implement
from javax.faces.component.EditableValueHolder
or
javax.faces.component.ActionSource
or Renderers for
javax.faces.component.UIForm
components. Renderers
for components that do not send data to the server on page submit
may choose to accept the no-op decode behavior of the
javax.faces.render.Renderer
abstract class. In the
Renderer descriptions that follow, the omission of a Decode
Behavior section indicates that this Renderer does no decoding.
If a Renderer chooses to implement decode behavior, it must consult the "disabled" and "readonly" attributes of the component to be rendered, if the value of either attribute is equal to, ignoring case, the string "true" (without the quotes) the decode method must take no action and return immediately.
General notes on encoding
If the value of the component's "rendered" property is false, the component, and its children must not be rendered.
General notes regarding the id
attribute
All components, and therefore all tags for those components
support the id
attribute. This attribute is optional.
If not present its value is autogenerated by the implementation and
used for internal purposes only. If present, an id
attribute must not start with the String
listed as the
value of the constant UIViewRoot.UNIQUE_ID_PREFIX
, and
it must be unique within the scope of the nearest component that is
a NamingContainer
.
All renderers must take the following action regarding the
id
attribute: If the value returned from
component.getId()
is non-null
and does
not start with UIViewRoot.UNIQUE_ID_PREFIX
, call
component.getClientId()
and render the result as the
value of the id
attribute in the markup for the
component. See the javadoc for
component.getClientId()
for details, particularly note
that the Renderer has a chance to modify the client id before it is
rendered. If the component doesn't generate any markup elements,
include the id
attribte on a "span" element that
encloses the content for the component.
In addition to any action already specified in the renderers, all
renderers for UIInput
components must take the
following action regarding the id
attribute: Call
component.getClientId()
and render the result as the
value of the name
attribute. This may cause some
renderers to have "id" and "name" attributes that have exactly the
same value.
General notes regarding the rendering of JavaScript in the standard components.
The intent of the standard renderkit is to specify the minimal Renderers a JSF implementation must provide. As such, it is the baseline for building JSF applications that are maximally portable across JSF implementations and user agents. Therefore, the use of JavaScript must be minimized as not all browsers support JavaScript, nor do all users enable JavaScript support in their user agents.
Compliant implementations must only generate JavaScript in the
javax.faces.Link
and javax.faces.Button
Renderers for the javax.faces.Command
component.
The generation of JavaScript in any other Renderer in the
HTML_BASIC renderkit is not permitted. However, any JavaScript
code provided by the user as the value of a passthru attribute,
such as "onmouseover", is excluded from this restriction.
Renderer Summary | ||
component-family | renderer-type | description |
---|---|---|
javax.faces.Command | javax.faces.Button | Renders an HTML "input" element. |
javax.faces.Link | Render an HTML "a" anchor element that acts like a form submit button when clicked. | |
javax.faces.Data | javax.faces.Table |
Renders an HTML "table" element compliant with the HTML 401 specification. |
javax.faces.Form | javax.faces.Form | Renders an HTML "form" element. |
javax.faces.Graphic | javax.faces.Image | Renders an HTML "img" element. |
javax.faces.Input | javax.faces.Hidden | Renders an HTML "input" element of type "hidden". |
javax.faces.Secret | Renders an HTML "input" element of "type" "password". | |
javax.faces.Text | Renders an HTML "input" element of "type" "text". | |
javax.faces.Textarea | Renders an HTML "textarea" element. | |
javax.faces.Message | javax.faces.Message | Render a single message for a specific component. |
javax.faces.Messages | javax.faces.Messages |
The same as for the Message renderer, but output all the messages. |
javax.faces.Output | javax.faces.Format | Render parameterized text. |
javax.faces.Label | Renders an HTML "label" element. | |
javax.faces.Link | Render an HTML "a" anchor element. | |
javax.faces.Text | If the "styleClass", "style", "dir" or "lang" attributes are present, render a "span" element. | |
javax.faces.Panel | javax.faces.Grid | Renders an HTML "table" element, conforming to the rules in the HTML 401 specification. |
javax.faces.Group | Intended for use in situations when only one UIComponent child can be nested, such as in the case of facets. | |
javax.faces.SelectBoolean | javax.faces.Checkbox | Renders an HTML "input" element of type "checkbox". |
javax.faces.SelectMany | javax.faces.Checkbox | Render an HTML checkbox list. |
javax.faces.Listbox | Render an HTML option list. | |
javax.faces.Menu | Render an HTML option list. | |
javax.faces.SelectOne | javax.faces.Listbox | Render an HTML option list. |
javax.faces.Menu | Render an HTML option list. | |
javax.faces.Radio | Render a set of html "input" elements of type "radio". |