SelectItem (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


javax.faces.model Class SelectItem

java.lang.Object
  extended by javax.faces.model.SelectItem
所有已实现的接口:
Serializable
直接已知子类:
SelectItemGroup

public class SelectItem
extends Object
implements Serializable

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

另请参见:
Serialized Form

构造器摘要
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.
 
方法摘要
 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.
 
类方法继承 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造器详细信息

SelectItem

public SelectItem()

Construct a SelectItem with no initialized property values.


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.

参数:
value - Value to be delivered to the model if this item is selected by the user


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.

参数:
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


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.

参数:
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


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.

参数:
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


SelectItem

public SelectItem(Object value,
                  String label,
                  String description,
                  boolean disabled,
                  boolean escape)

Construct a SelectItem instance with the specified property values.

参数:
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.
从以下版本开始:
1.2

方法详细信息

getDescription

public String getDescription()

Return a description of this item, for use in development tools.


setDescription

public void setDescription(String description)

Set the description of this item, for use in development tools.

参数:
description - The new description

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.


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.

参数:
disabled - The new disabled flag

getLabel

public String getLabel()

Return the label of this item, to be rendered visibly for the user.


setLabel

public void setLabel(String label)

Set the label of this item, to be rendered visibly for the user.

参数:
label - The new label

getValue

public Object getValue()

Return the value of this item, to be delivered to the model if this item is selected by the user.


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.

参数:
value - The new value

isEscape

public boolean isEscape()
Getter for property escape.

返回:
Value of property escape.

setEscape

public void setEscape(boolean escape)
Setter for property escape.

参数:
escape - New value of property escape.

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.