Class SelectItemGroup
- All Implemented Interfaces:
Serializable
SelectItemGroup is a subclass of SelectItem that identifies a set of options that will be
made available as a subordinate "submenu" or "options list", depending upon the requirements of the
UISelectMany or UISelectOne renderer that is actually used. In general, the value
property of this instance will be ignored, and the label property of this instance will be used to label
the submenu.
Although it is feasible to incorporate SelectItemGroup instances in he selectItems property of
this instance (thereby creating a data structure suitable for cascading submenus), some renderers may place
restrictions on the level of nesting they support. For example, HTML based renderers that create an
<select> element will typically render this instance as an <optgroup> element,
but the HTML 4.01 Specification disallows nested option groups.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct aSelectItemGroupwith no initialized property values.SelectItemGroup(String label) Construct aSelectItemGroupwith the specified label and no associatedselectItems.SelectItemGroup(String label, String description, boolean disabled, SelectItem... selectItems) Construct aSelectItemGroupwith the specified properties.SelectItemGroup(String label, String description, boolean disabled, Collection<? extends SelectItem> selectItems) Construct aSelectItemGroupwith the specified properties. -
Method Summary
Modifier and TypeMethodDescriptionReturn the set of subordinateSelectItems for this group.voidsetSelectItems(SelectItem... selectItems) Set the set of subordinateSelectItems for this group as a variable array.voidsetSelectItems(Collection<? extends SelectItem> selectItems) Set the set of subordinateSelectItems for this group as a collection.Methods inherited from class SelectItem
getDescription, getLabel, getValue, isDisabled, isEscape, isNoSelectionOption, setDescription, setDisabled, setEscape, setLabel, setNoSelectionOption, setValueModifier and TypeMethodDescriptionReturn a description of this item, for use in development tools.getLabel()Return the label of this item, to be rendered visibly for the user.getValue()Return the value of this item, to be delivered to the model if this item is selected by the user.booleanReturn the disabled flag for this item, which should modify the rendered output to make this item unavailable for selection by the user if set totrue.booleanisEscape()If and only if this returnstrue, the code that renders this select item must escape the label using escaping syntax appropriate to the content type being rendered.booleanReturn the value of thenoSelectionOptionproperty.voidsetDescription(String description) Set the description of this item, for use in development tools.voidsetDisabled(boolean disabled) Set the disabled flag for this item, which should modify the rendered output to make this item unavailable for selection by the user if set totrue.voidsetEscape(boolean escape) Set the value of the escape property.voidSet the label of this item, to be rendered visibly for the user.voidsetNoSelectionOption(boolean noSelectionOption) Set the value of thenoSelectionOptionproperty.voidSet the value of this item, to be delivered to the model if this item is selected by this user.
-
Constructor Details
-
SelectItemGroup
public SelectItemGroup()Construct a
SelectItemGroupwith no initialized property values. -
SelectItemGroup
Construct a
SelectItemGroupwith the specified label and no associatedselectItems. Thevalueproperty will be set to a zero-length String, thedescriptionproperty will be set tonull, and thedisabledproperty will be set to false.- Parameters:
label- Label to be rendered for this group in the response- Throws:
NullPointerException- iflabelisfalse
-
SelectItemGroup
public SelectItemGroup(String label, String description, boolean disabled, SelectItem... selectItems) Construct a
SelectItemGroupwith the specified properties. Thevalueproperty will be set to a zero-length String.- Parameters:
label- Label to be rendered for this group in the responsedescription- Description of this group, for use in toolsdisabled- Flag indicating that this group is disabledselectItems- Variable array ofSelectItemdescribing the items available in this group- Throws:
NullPointerException- iflabelorselectItemsisfalse
-
SelectItemGroup
public SelectItemGroup(String label, String description, boolean disabled, Collection<? extends SelectItem> selectItems) Construct a
SelectItemGroupwith the specified properties. Thevalueproperty will be set to a zero-length String.- Parameters:
label- Label to be rendered for this group in the responsedescription- Description of this group, for use in toolsdisabled- Flag indicating that this group is disabledselectItems- Collection ofSelectItemdescribing the items available in this group- Throws:
NullPointerException- iflabelorselectItemsisfalse- Since:
- 4.0
-
-
Method Details
-
getSelectItems
Return the set of subordinate
SelectItems for this group.- Returns:
- the set of subordinate
SelectItems for this group
-
setSelectItems
Set the set of subordinate
SelectItems for this group as a variable array.- Parameters:
selectItems- The new set of subordinate items as a variable array- Throws:
NullPointerException- ifselectItemsisnull
-
setSelectItems
Set the set of subordinate
SelectItems for this group as a collection.- Parameters:
selectItems- The new set of subordinate items as a collection.- Throws:
NullPointerException- ifselectItemsisnull- Since:
- 4.0
-