Top Description Fields Constructors Methods
javax.faces.model

public Class SelectItemGroup

extends SelectItem
Class Inheritance
Imports
javax.faces.component.UISelectMany, .UISelectOne

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.

Field Summary

Modifier and TypeField and Description
private SelectItem[]
private static final long

Constructor Summary

AccessConstructor and Description
public
SelectItemGroup()

Construct a SelectItemGroup with no initialized property values.

public
SelectItemGroup(String
Label to be rendered for this group in the response
label
)

Construct a SelectItemGroup with the specified label and no associated selectItems.

public
SelectItemGroup(String
Label to be rendered for this group in the response
label
,
String
Description of this group, for use in tools
description
,
boolean
Flag indicating that this group is disabled
disabled
,
SelectItem[]
Array of SelectItem describing the items available in this group
selectItems
)

Construct a SelectItemGroup with the specified properties.

Method Summary

Modifier and TypeMethod and Description
public SelectItem[]

Returns:

the set of subordinate SelectItems for this group
getSelectItems
()

Return the set of subordinate SelectItems for this group.

public void
setSelectItems(SelectItem[]
The new set of subordinate items
selectItems
)

Set the set of subordinate SelectItems for this group.

Inherited from javax.faces.model.SelectItem:
getDescriptiongetLabelgetValueisDisabledisEscapeisNoSelectionOptionsetDescriptionsetDisabledsetEscapesetLabelsetNoSelectionOptionsetValue

Field Detail

selectItemsback to summary
private SelectItem[] selectItems
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.faces.model.SelectItem.serialVersionUID.

Constructor Detail

SelectItemGroupback to summary
public SelectItemGroup()

Construct a SelectItemGroup with no initialized property values.

SelectItemGroupback to summary
public SelectItemGroup(String label)

Construct a SelectItemGroup with the specified label and no associated selectItems. 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.

Parameters
label:String

Label to be rendered for this group in the response

Exceptions
NullPointerException:
if label is false
SelectItemGroupback to summary
public SelectItemGroup(String label, String description, boolean disabled, SelectItem[] selectItems)

Construct a SelectItemGroup with the specified properties. The value property will be set to a zero-length String.

Parameters
label:String

Label to be rendered for this group in the response

description:String

Description of this group, for use in tools

disabled:boolean

Flag indicating that this group is disabled

selectItems:SelectItem[]

Array of SelectItem describing the items available in this group

Exceptions
NullPointerException:
if label or selectItems is false

Method Detail

getSelectItemsback to summary
public SelectItem[] getSelectItems()

Return the set of subordinate SelectItems for this group.

Returns:SelectItem[]

the set of subordinate SelectItems for this group

setSelectItemsback to summary
public void setSelectItems(SelectItem[] selectItems)

Set the set of subordinate SelectItems for this group.

Parameters
selectItems:SelectItem[]

The new set of subordinate items

Exceptions
NullPointerException:
if selectItems is null