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
ConstructorDescriptionConstruct aSelectItemGroup
with no initialized property values.SelectItemGroup
(String label) Construct aSelectItemGroup
with the specified label and no associatedselectItem
s.SelectItemGroup
(String label, String description, boolean disabled, SelectItem[] selectItems) Construct aSelectItemGroup
with the specified properties. -
Method Summary
Modifier and TypeMethodDescriptionReturn the set of subordinateSelectItem
s for this group.void
setSelectItems
(SelectItem[] selectItems) Set the set of subordinateSelectItem
s for this group.Methods inherited from class jakarta.faces.model.SelectItem
getDescription, getLabel, getValue, isDisabled, isEscape, isNoSelectionOption, setDescription, setDisabled, setEscape, setLabel, setNoSelectionOption, setValue
-
Constructor Details
-
SelectItemGroup
public SelectItemGroup()Construct a
SelectItemGroup
with no initialized property values. -
SelectItemGroup
Construct a
SelectItemGroup
with the specified label and no associatedselectItem
s. Thevalue
property will be set to a zero-length String, thedescription
property will be set tonull
, and thedisabled
property will be set to false.- Parameters:
label
- Label to be rendered for this group in the response- Throws:
NullPointerException
- iflabel
isfalse
-
SelectItemGroup
public SelectItemGroup(String label, String description, boolean disabled, SelectItem[] selectItems) Construct a
SelectItemGroup
with the specified properties. Thevalue
property 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
- Array ofSelectItem
describing the items available in this group- Throws:
NullPointerException
- iflabel
orselectItems
isfalse
-
-
Method Details
-
getSelectItems
Return the set of subordinate
SelectItem
s for this group.- Returns:
- the set of subordinate
SelectItem
s for this group
-
setSelectItems
Set the set of subordinate
SelectItem
s for this group.- Parameters:
selectItems
- The new set of subordinate items- Throws:
NullPointerException
- ifselectItems
isnull
-