public class SelectItemGroup extends SelectItem
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.
Constructor and Description |
---|
SelectItemGroup()
Construct a
SelectItemGroup with no initialized property values. |
SelectItemGroup(java.lang.String label)
Construct a
SelectItemGroup with the specified label and no associated selectItem s. |
SelectItemGroup(java.lang.String label,
java.lang.String description,
boolean disabled,
java.util.Collection<? extends SelectItem> selectItems)
Construct a |
SelectItemGroup(java.lang.String label,
java.lang.String description,
boolean disabled,
SelectItem... selectItems)
Construct a
SelectItemGroup with the specified properties. |
Modifier and Type | Method and Description |
---|---|
SelectItem[] |
getSelectItems()
Return the set of subordinate
SelectItem s for this group. |
void |
setSelectItems(java.util.Collection<? extends SelectItem> selectItems)
Set the set of subordinate |
void |
setSelectItems(SelectItem... selectItems)
Set the set of subordinate
SelectItem s for this group as a variable array. |
getDescription, getLabel, getValue, isDisabled, isEscape, isNoSelectionOption, setDescription, setDisabled, setEscape, setLabel, setNoSelectionOption, setValue
public SelectItemGroup()
Construct a SelectItemGroup
with no initialized property values.
public SelectItemGroup(java.lang.String label)
Construct a SelectItemGroup
with the specified label and no associated selectItem
s. The
value
property will be set to a zero-length String, the description
property will be set to
null
, and the disabled
property will be set to false.
label
- Label to be rendered for this group in the responsejava.lang.NullPointerException
- if label
is false
public SelectItemGroup(java.lang.String label, java.lang.String description, boolean disabled, SelectItem... selectItems)
Construct a SelectItemGroup
with the specified properties. The value
property will be set
to a zero-length String.
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 of SelectItem
describing the items available in this groupjava.lang.NullPointerException
- if label
or selectItems
is false
public SelectItemGroup(java.lang.String label, java.lang.String description, boolean disabled, java.util.Collection<? extends SelectItem> selectItems)
Construct a SelectItemGroup
with the specified properties. The value
property will be set
to a zero-length String.
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 of SelectItem
describing the items available in this groupjava.lang.NullPointerException
- if label
or selectItems
is false
public SelectItem[] getSelectItems()
Return the set of subordinate SelectItem
s for this group.
SelectItem
s for this grouppublic void setSelectItems(SelectItem... selectItems)
Set the set of subordinate SelectItem
s for this group as a variable array.
selectItems
- The new set of subordinate items as a variable arrayjava.lang.NullPointerException
- if selectItems
is null
public void setSelectItems(java.util.Collection<? extends SelectItem> selectItems)
Set the set of subordinate SelectItem
s for this group as a collection.
selectItems
- The new set of subordinate items as a collection.java.lang.NullPointerException
- if selectItems
is null