Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.faces.model
Class SelectItemGroup

    java.lang.Object
      javax.faces.model.SelectItem
          javax.faces.model.SelectItemGroup

All Implemented Interfaces:
  java.io.Serializable

    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.

See Also:
  Serialized Form

Constructor Summary
`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, SelectItem[] selectItems)` Construct a `SelectItemGroup` with the specified properties.

Method Summary
`SelectItem[]` | `getSelectItems()` Return the set of subordinate `SelectItem`s for this group.
`void` | `setSelectItems(SelectItem[] selectItems)` Set the set of subordinate `SelectItem`s for this group.

Methods inherited from class javax.faces.model.SelectItem
`getDescription, getLabel, getValue, isDisabled, isEscape, isNoSelectionOption, setDescription, setDisabled, setEscape, setLabel, setNoSelectionOption, setValue`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SelectItemGroup

    public SelectItemGroup()

  Construct a `SelectItemGroup` with no initialized property values.

### SelectItemGroup

    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.

  Parameters:
    `label` - Label to be rendered for this group in the response
  Throws:
    `java.lang.NullPointerException` - if `label` is `false`

### SelectItemGroup

    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.

  Parameters:
    `label` - Label to be rendered for this group in the response
    `description` - Description of this group, for use in tools
    `disabled` - Flag indicating that this group is disabled
    `selectItems` - Array of `SelectItem` describing the items available in this group
  Throws:
    `java.lang.NullPointerException` - if `label` or `selectItems` is `false`

Method Detail

### getSelectItems

    public SelectItem[] getSelectItems()

  Return the set of subordinate `SelectItem`s for this group.

### setSelectItems

    public void setSelectItems(SelectItem[] selectItems)

  Set the set of subordinate `SelectItem`s for this group.

  Parameters:
    `selectItems` - The new set of subordinate items
  Throws:
    `java.lang.NullPointerException` - if `selectItems` is `null`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2002-2010 Oracle America Inc, Inc. All Rights Reserved.