|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.faces.model Class SelectItem
java.lang.Object javax.faces.model.SelectItem
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- SelectItemGroup
public class SelectItem
- extends Object
- implements Serializable
SelectItem 表示 UISelectMany
或 UISelectOne
组件关联的支持条目 列表中的一个条目。
SelectItem represents a single item in the
list of supported items associated with a UISelectMany
or UISelectOne
component.
- See Also:
- Serialized Form
Constructor Summary | |
---|---|
SelectItem()
Construct a SelectItem with no initialized property
values. |
|
SelectItem(Object value)
Construct a SelectItem with the specified value. |
|
SelectItem(Object value,
String label)
Construct a SelectItem with the specified value and
label. |
|
SelectItem(Object value,
String label,
String description)
Construct a SelectItem instance with the specified
value, label and description. |
|
SelectItem(Object value,
String label,
String description,
boolean disabled)
Construct a SelectItem instance with the specified
property values. |
|
SelectItem(Object value,
String label,
String description,
boolean disabled,
boolean escape)
Construct a SelectItem instance with the specified
property values. |
Method Summary | |
---|---|
String |
getDescription()
Return a description of this item, for use in development tools. |
String |
getLabel()
Return the label of this item, to be rendered visibly for the user. |
Object |
getValue()
Return the value of this item, to be delivered to the model if this item is selected by the user. |
boolean |
isDisabled()
Return the disabled flag for this item, which should modify the rendered output to make this item unavailable for selection by the user if set to true . |
boolean |
isEscape()
Getter for property escape. |
void |
setDescription(String description)
Set the description of this item, for use in development tools. |
void |
setDisabled(boolean disabled)
Set the disabled flag for this item, which should modify the rendered output to make this item unavailable for selection by the user if set to true . |
void |
setEscape(boolean escape)
Setter for property escape. |
void |
setLabel(String label)
Set the label of this item, to be rendered visibly for the user. |
void |
setValue(Object value)
Set the value of this item, to be delivered to the model if this item is selected by this user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public
SelectItem()
构造一个 SelectItem
,没有初始化任何属性值。
SelectItem
public SelectItem()
Construct a
SelectItem
with no initialized property values.
public
SelectItem(Object value)
构造带指定值的 SelectItem
。label
属性将被设置为该值(如有必要,则转换为 String),description
属性将被设置为 null
,disabled
属性将被设置为 false
,escape
属性将被设置为 true
。
value | 用户选定此条目时要传递给模型的值 |
SelectItem
public SelectItem(Object value)
Construct a
SelectItem
with the specified value. Thelabel
property will be set to the value (converted to a String, if necessary), thedescription
property will be set tonull
, thedisabled
property will be set tofalse
, and theescape
property will be set to (true
.- Parameters:
value
- Value to be delivered to the model if this item is selected by the user
public
SelectItem(Object value, String label)
构造带指定值和标签的 SelectItem
。description
属性将被设置为 null
,disabled
属性将被设置为 false
,escape
属性将被设置为 true
。
value | 用户选定此条目时要传递给模型的值 |
label | 响应时要为此条目呈现的标签 |
SelectItem
public SelectItem(Object value, String label)
Construct a
SelectItem
with the specified value and label. Thedescription
property will be set tonull
, thedisabled
property will be set tofalse
, and theescape
property will be set totrue
.- Parameters:
value
- Value to be delivered to the model if this item is selected by the userlabel
- Label to be rendered for this item in the response
public
SelectItem(Object value, String label, String description)
构造带指定值、标签和描述的 SelectItem
实例。disabled
属性将被设置为 false
,escape
属性将被设置为 true
。
value | 用户选定此条目时要传递给模型的值 |
label | 响应时要为此条目呈现的标签 |
description | 此条目的描述,在工具中使用 |
SelectItem
public SelectItem(Object value, String label, String description)
Construct a
SelectItem
instance with the specified value, label and description. Thisdisabled
property will be set tofalse
, and theescape
property will be set totrue
.- Parameters:
value
- Value to be delivered to the model if this item is selected by the userlabel
- Label to be rendered for this item in the responsedescription
- Description of this item, for use in tools
public
SelectItem(Object value, String label, String description, boolean disabled)
构造带指定属性值的 SelectItem
实例。escape
属性将被设置为 true
。
value | 用户选定此条目时要传递给模型的值 |
label | 响应时要为此条目呈现的标签 |
description | 此条目的描述,在工具中使用 |
disabled | 指示此选项已禁用的标志 |
SelectItem
public SelectItem(Object value, String label, String description, boolean disabled)
Construct a
SelectItem
instance with the specified property values. Theescape
property will be set totrue
.- Parameters:
value
- Value to be delivered to the model if this item is selected by the userlabel
- Label to be rendered for this item in the responsedescription
- Description of this item, for use in toolsdisabled
- Flag indicating that this option is disabled
public
SelectItem(Object value, String label, String description, boolean disabled, boolean escape)
构造带指定属性值的 SelectItem
实例。
value | 用户选定此条目时要传递给模型的值 |
label | 响应时要为此条目呈现的标签 |
description | 此条目的描述,在工具中使用 |
disabled | 指示此选项已禁用的标志 |
escape | 指示呈现时此选项的文本应该转义的标志。 |
since | 1.2 |
SelectItem
public SelectItem(Object value, String label, String description, boolean disabled, boolean escape)
Construct a
SelectItem
instance with the specified property values.- Parameters:
value
- Value to be delivered to the model if this item is selected by the userlabel
- Label to be rendered for this item in the responsedescription
- Description of this item, for use in toolsdisabled
- Flag indicating that this option is disabledescape
- Flag indicating that the text of this option should be escaped when rendered.- Since:
- 1.2
Method Detail |
---|
public String
getDescription()
返回此条目的描述,在开发工具中使用。
getDescription
public String getDescription()
Return a description of this item, for use in development tools.
public void
setDescription(String description)
设置此条目的描述,在开发工具中使用。
description | 新的描述 |
setDescription
public void setDescription(String description)
Set the description of this item, for use in development tools.
- Parameters:
description
- The new description
public boolean
isDisabled()
返回此条目的禁用标志,如果设置为 true
,则应该修改呈现的输出,使用户不能选择此条目。
isDisabled
public boolean isDisabled()
Return the disabled flag for this item, which should modify the rendered output to make this item unavailable for selection by the user if set to
true
.
public void
setDisabled(boolean disabled)
设置此条目的禁用标志,如果设置为 true
,则应该修改呈现的输出,使用户不能选择此条目。
disabled | 新的禁用标志 |
setDisabled
public void setDisabled(boolean disabled)
Set the disabled flag for this item, which should modify the rendered output to make this item unavailable for selection by the user if set to
true
.- Parameters:
disabled
- The new disabled flag
public String
getLabel()
返回此条目的标签,该标签将呈现给用户。
getLabel
public String getLabel()
Return the label of this item, to be rendered visibly for the user.
public void
setLabel(String label)
设置此条目的标签,该标签将呈现给用户。
label | 新的标签 |
setLabel
public void setLabel(String label)
Set the label of this item, to be rendered visibly for the user.
- Parameters:
label
- The new label
public Object
getValue()
返回此条目的值,用户选择此条目时该值将传送给模型。
getValue
public Object getValue()
Return the value of this item, to be delivered to the model if this item is selected by the user.
public void
setValue(Object value)
设置此条目的值,用户选择此条目时该值将传送给模型。
value | 新值 |
setValue
public void setValue(Object value)
Set the value of this item, to be delivered to the model if this item is selected by this user.
- Parameters:
value
- The new value
public boolean
isEscape()
escape 属性的获取方法。
return | escape 属性的值。 |
isEscape
public boolean isEscape()
- Getter for property escape.
- Returns:
- Value of property escape.
public void
setEscape(boolean escape)
escape 属性的设置方法。
escape | escape 属性的新值。 |
setEscape
public void setEscape(boolean escape)
- Setter for property escape.
- Parameters:
escape
- New value of property escape.
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!