Name
SelectOne/Radio
Synopsis
This renderer represents a select-one component as a radio button group.
Component family: |
javax.faces.SelectOne |
Renderer type: |
javax.faces.Radio |
Renders children: |
No |
Encode behavior
Renders the component as an HTML <table>
element with an <input>
element for each
choice represented by the component’s children (one
or more UISelectItem
and
UISelectItems
components) as the table cells. If
the layout
attribute is set to
pageDirection
, each cell is rendered in a separate
table row; otherwise all cells are rendered in one row. A
UISelectItemGroup
child component is rendered as a
nested table within the corresponding outer table cell. If the
component ID is set, a <span>
element with
an id
attribute containing the
component’s client ID is rendered around the outer
table.
The <input>
elements are rendered with a
type
attribute set to radio
and
a name
attribute set to the
component’s client ID. Each
<input>
element is also nested within a
<label>
elements with a
for
attribute set to the
component’s client ID. For all the choice that
matches the component’s value, the
checked
attribute is set for the corresponding
<input>
element.
Decode behavior
Looks for a request parameter with the component’s
client ID as the name. If it finds the parameter, the renderer passes
the parameter value to the
component’s setSubmittedValue()
method.
Attributes
[accesskey="accessKey
"] [border="border
"] [dir="ltr|rtl"] [disabled="true|false
"] [disabledClass="styleClass
"] [enabledClass=" ...
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.