UISelectMany is a {@link UIComponent} that representsthe user's choice of a zero or more items from among a discrete set of available options. The user can modify the selected values. Optionally, the component can be preconfigured with zero or more currently selected items, by storing them as an array in the value
property of the component.
This component is generally rendered as a select box or a group of checkboxes.
By default, the rendererType
property must be set to "javax.faces.Listbox
". This value can be changed by calling the setRendererType()
method.
The {@link javax.faces.render.Renderer} for this component mustperform the following logic on getConvertedValue()
:
Obtain the {@link javax.faces.convert.Converter} using the following algorithm:
If the component has an attached {@link javax.faces.convert.Converter}, use it.
If not, look for a {@link ValueExpression} for value
(if any). The {@link ValueExpression} must point to something thatis:
int[]
). Look up the registered by-class {@link javax.faces.convert.Converter} for this primitive type.Integer[]
or String[]
). Look up the registered by-class {@link javax.faces.convert.Converter} for the underlying element type.java.util.List
. Assume that the element type is java.lang.String
, so no conversion is required.If for any reason a Converter
cannot be found, assume the type to be a String array.
Use the selected {@link javax.faces.convert.Converter} (if any) to convert each element in thevalues array or list from the request to the proper type. If the component has a {@link ValueBinding} for value
, create an arrayof the expected type to hold the converted values. If the component does not have a {@link ValueBinding} for value
, createan array of type Object
. Store the created array as the local value of the component, set the component's valid
state to true
and return.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|