|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.faces.model Class SelectItemGroup
java.lang.Objectjavax.faces.model.SelectItem
javax.faces.model.SelectItemGroup
- All Implemented Interfaces:
- Serializable
public class SelectItemGroup
- extends SelectItem
SelectItemGroup 是 SelectItem 的子类,它标识将用作从属“子菜单”或“选项列表”的一组选项,具体取决于实际使用的 UISelectMany 或 UISelectOne Renderer 的要求。通常,此实例的 value 属性将被忽略,而其 label 属性将用作子菜单的标签。
尽管可以将 SelectItemGroup 实例合并到此实例的 selectItems 属性(据以创建一个适合级联子菜单的数据结构),但是一些 Renderer 可能限制支持的嵌套层次。例如,创建 <select> 元素的基于 HTML 的 Renderer 通常将此实例呈现为 <optgroup> 元素,但是 HTML 4.01 规范不允许选项组嵌套。
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(String label)
Construct a SelectItemGroup with the specified label
and no associated selectItems. |
|
SelectItemGroup(String label,
String description,
boolean disabled,
SelectItem[] selectItems)
Construct a SelectItemGroup with the specified
properties. |
|
| Method Summary | |
|---|---|
SelectItem[] |
getSelectItems()
Return the set of subordinate SelectItems for this group. |
void |
setSelectItems(SelectItem[] selectItems)
Set the set of subordinate SelectItems for this group. |
| Methods inherited from class javax.faces.model.SelectItem |
|---|
getDescription, getLabel, getValue, isDisabled, isEscape, setDescription, setDisabled, setEscape, setLabel, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public
SelectItemGroup()
构造一个 SelectItemGroup,没有初始化任何属性值。
SelectItemGroup
public SelectItemGroup()
Construct a
SelectItemGroupwith no initialized property values.
public
SelectItemGroup(String label)
构造带指定标签并且没有关联 selectItem 的 SelectItemGroup。value 属性将设置为长度为 0 的 String,description 属性将被设置为 null,disabled 属性将被设置为 false。
| label | 响应时要为该组呈现的标签 |
| Throws | NullPointerException:
如果 label 为 false |
SelectItemGroup
public SelectItemGroup(String label)
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
public
SelectItemGroup(String label, String description, boolean disabled, SelectItem[] selectItems)
构造带指定属性的 SelectItemGroup。value 属性将被设置为长度为 0 的 String。
| label | 响应时要为该组呈现的标签 |
| description | 此组的描述,在工具中使用 |
| disabled | 指示此组已禁用的标志 |
| selectItems |
描述此组中可用条目的 SelectItem 数组 |
| Throws | NullPointerException:
如果 label 或 selectItems 为 false |
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- Array ofSelectItemdescribing the items available in this group- Throws:
NullPointerException- iflabelorselectItemsisfalse
| Method Detail |
|---|
public SelectItem[]
getSelectItems()
返回此组的从属 SelectItem 集。
getSelectItems
public SelectItem[] getSelectItems()
Return the set of subordinate
SelectItems for this group.
public void
setSelectItems(SelectItem[] selectItems)
设置此组的从属 SelectItem 集。
| selectItems | 新的从属条目集 |
| Throws | NullPointerException:
如果 selectItems 为 null |
setSelectItems
public void setSelectItems(SelectItem[] selectItems)
Set the set of subordinate
SelectItems for this group.- Parameters:
selectItems- The new set of subordinate items- Throws:
NullPointerException- ifselectItemsisnull
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!
