Name

SelectOne/Menu

Synopsis

This renderer represents a select-one component as a selection list drop-down menu.

Component family:

javax.faces.SelectOne

Renderer type:

javax.faces.Menu

Renders children:

No

Encode behavior

Renders the component as an HTML <select> element with a name attribute set to the component’s client ID and a multiple attribute and a size attribute with 1 as the value. Each choice represented by the component’s children (one or more UISelectItem and UISelectItems components) is rendered as an <option> element or as an <optgroup> element if the child is of the UISelectItemGroup subtype. For the choice that matches the component’s value, the selected attribute is set for the corresponding <option> element. If a choice is marked as disabled, the disabled attribute is also added.

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"] [dir="ltr|rtl"] [disabled="true|false"]
[lang="lang"] [onblur="code"] [onchange="code"] [onclick="code"]
[ondblclick="code"] [onfocus="code"] [onkeydown="code"]
[onkeypress="code"] [onkeyup="code"] [onmousedown="code"]
[onmousemove="code"] [onmouseout="code"] [onmouseover="code"]
[onmouseup="code"] [onselect="code"] [readonly="true|false"]
[style="style"] [styleClass="styleClass"] [tabindex="tabIndex"]
[title="title"]

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.