SelectItem (Java EE 5)

Java EE API


javax.faces.model Class SelectItem

java.lang.Object
  extended by javax.faces.model.SelectItem
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SelectItemGroup

public class SelectItem
extends Object
implements Serializable

Implements: java.io.Serializable
Extended by: SelectItemGroup

SelectItem 表示 UISelectManyUISelectOne 组件关联的支持条目 列表中的一个条目

英文文档:

SelectItem represents a single item in the list of supported items associated with a UISelectMany or UISelectOne component.

See Also:
Serialized Form

Constructor Summary
 
Method Summary
 String
 String
 Object
 boolean
 boolean
 void
 void
 void
 void
 void
 
Methods inherited from class java.lang.Object
 

Constructor Detail

public SelectItem()

构造一个 SelectItem,没有初始化任何属性值。

英文文档:

SelectItem

public SelectItem()

Construct a SelectItem with no initialized property values.


public SelectItem(Object value)

构造带指定值的 SelectItemlabel 属性将被设置为该值(如有必要,则转换为 String),description 属性将被设置为 nulldisabled 属性将被设置为 falseescape 属性将被设置为 true

value 用户选定此条目时要传递给模型的值
英文文档:

SelectItem

public SelectItem(Object value)

Construct a SelectItem with the specified value. The label property will be set to the value (converted to a String, if necessary), the description property will be set to null, the disabled property will be set to false, and the escape 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)

构造带指定值和标签的 SelectItemdescription 属性将被设置为 nulldisabled 属性将被设置为 falseescape 属性将被设置为 true

value 用户选定此条目时要传递给模型的值
label 响应时要为此条目呈现的标签
英文文档:

SelectItem

public SelectItem(Object value,
                  String label)

Construct a SelectItem with the specified value and label. The description property will be set to null, the disabled property will be set to false, and the escape property will be set to true.

Parameters:
value - Value to be delivered to the model if this item is selected by the user
label - Label to be rendered for this item in the response


public SelectItem(Object value, String label, String description)

构造带指定值、标签和描述的 SelectItem 实例。disabled 属性将被设置为 falseescape 属性将被设置为 true

value 用户选定此条目时要传递给模型的值
label 响应时要为此条目呈现的标签
description 此条目的描述,在工具中使用
英文文档:

SelectItem

public SelectItem(Object value,
                  String label,
                  String description)

Construct a SelectItem instance with the specified value, label and description. This disabled property will be set to false, and the escape property will be set to true.

Parameters:
value - Value to be delivered to the model if this item is selected by the user
label - Label to be rendered for this item in the response
description - 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. The escape property will be set to true.

Parameters:
value - Value to be delivered to the model if this item is selected by the user
label - Label to be rendered for this item in the response
description - Description of this item, for use in tools
disabled - 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 指示呈现时此选项的文本应该转义的标志。
since1.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 user
label - Label to be rendered for this item in the response
description - Description of this item, for use in tools
disabled - Flag indicating that this option is disabled
escape - 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.


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!