Name
SelectMany/Checkbox
Synopsis
This renderer represents a select-many component as a group of checkboxes.
Component family: |
javax.faces.SelectMany |
Renderer type: |
javax.faces.Checkbox |
Renders children: |
No |
Encode behavior
Renders the component as an HTML <table>
element with an <input>
element for each
choice represented by its 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 checkbox
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 choices that match
one of the component’s values, the
checked
attribute is set for the corresponding
<input>
element.
Decode behavior
Looks for request parameters with the component’s
client ID as the name. If it finds parameters, the renderer the calls
component’s setSubmittedValue()
method with a String[]
holding all parameter
values as the value; otherwise it calls the same method with an empty
String[]
as the value.
Attributes
[accesskey=" ...
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.