Top Description Fields Constructors Methods
javax.faces.model

public Class SelectItem

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
javax.faces.model.SelectItemGroup, com.sun.faces.renderkit.SelectItemsIterator.GenericObjectSelectItemIterator.GenericObjectSelectItem, javax.faces.component.SelectItemsIterator.GenericObjectSelectItemIterator.GenericObjectSelectItem
Imports
java.io.Serializable, javax.faces.component.UISelectMany, .UISelectOne

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

Field Summary

Modifier and TypeField and Description
private String
private boolean
private boolean
private String
private boolean
private static final long
private Object

Constructor Summary

AccessConstructor and Description
public
SelectItem()

Construct a SelectItem with no initialized property values.

public
SelectItem(Object
Value to be delivered to the model if this item is selected by the user
value
)

Construct a SelectItem with the specified value.

public
SelectItem(Object
Value to be delivered to the model if this item is selected by the user
value
,
String
Label to be rendered for this item in the response
label
)

Construct a SelectItem with the specified value and label.

public
SelectItem(Object
Value to be delivered to the model if this item is selected by the user
value
,
String
Label to be rendered for this item in the response
label
,
String
Description of this item, for use in tools
description
)

Construct a SelectItem instance with the specified value, label and description.

public
SelectItem(Object
Value to be delivered to the model if this item is selected by the user
value
,
String
Label to be rendered for this item in the response
label
,
String
Description of this item, for use in tools
description
,
boolean
Flag indicating that this option is disabled
disabled
)

Construct a SelectItem instance with the specified property values.

public
SelectItem(Object
Value to be delivered to the model if this item is selected by the user
value
,
String
Label to be rendered for this item in the response
label
,
String
Description of this item, for use in tools
description
,
boolean
Flag indicating that this option is disabled
disabled
,
boolean
Flag indicating that the text of this option should be escaped when rendered.
escape
)

Construct a SelectItem instance with the specified property values.

public
SelectItem(Object
Value to be delivered to the model if this item is selected by the user
value
,
String
Label to be rendered for this item in the response
label
,
String
Description of this item, for use in tools
description
,
boolean
Flag indicating that this option is disabled
disabled
,
boolean
Flag indicating that the text of this option should be escaped when rendered.
escape
,
boolean
Flag indicating that the current option is a "no selection" option
noSelectionOption
)

Construct a SelectItem instance with the specified property values.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a description of this item, for use in development tools
getDescription
()

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

public String

Returns:

the label of this item
getLabel
()

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

public Object

Returns:

the value of this item
getValue
()

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

public boolean

Returns:

the disabled flag for this item
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 boolean

Returns:

the escape value.
isEscape
()

If and only if this returns true, the code that renders this select item must escape the label using escaping syntax appropriate to the content type being rendered.

public boolean

Returns:

the value of the noSelectionOption property
isNoSelectionOption
()

Return the value of the noSelectionOption property.

public void
setDescription(String
The new description
description
)

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

public void
setDisabled(boolean
The new disabled flag
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.

public void
setEscape(boolean
the new value of the escape property
escape
)

Set the value of the escape property.

public void
setLabel(String
The new label
label
)

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

public void
setNoSelectionOption(boolean
the new value of the noSelectionOption property
noSelectionOption
)

Set the value of the noSelectionOption property.

public void
setValue(Object
The new value
value
)

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

descriptionback to summary
private String description
disabledback to summary
private boolean disabled
escapeback to summary
private boolean escape
labelback to summary
private String label
noSelectionOptionback to summary
private boolean noSelectionOption
serialVersionUIDback to summary
private static final long serialVersionUID
valueback to summary
private Object value
Annotations
@SuppressWarnings:NonSerializableFieldInSerializableClass

Constructor Detail

SelectItemback to summary
public SelectItem()

Construct a SelectItem with no initialized property values.

SelectItemback to summary
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:Object

Value to be delivered to the model if this item is selected by the user

SelectItemback to summary
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:Object

Value to be delivered to the model if this item is selected by the user

label:String

Label to be rendered for this item in the response

SelectItemback to summary
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:Object

Value to be delivered to the model if this item is selected by the user

label:String

Label to be rendered for this item in the response

description:String

Description of this item, for use in tools

SelectItemback to summary
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:Object

Value to be delivered to the model if this item is selected by the user

label:String

Label to be rendered for this item in the response

description:String

Description of this item, for use in tools

disabled:boolean

Flag indicating that this option is disabled

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

Construct a SelectItem instance with the specified property values.

Parameters
value:Object

Value to be delivered to the model if this item is selected by the user

label:String

Label to be rendered for this item in the response

description:String

Description of this item, for use in tools

disabled:boolean

Flag indicating that this option is disabled

escape:boolean

Flag indicating that the text of this option should be escaped when rendered.

Since
1.2
SelectItemback to summary
public SelectItem(Object value, String label, String description, boolean disabled, boolean escape, boolean noSelectionOption)

Construct a SelectItem instance with the specified property values.

Parameters
value:Object

Value to be delivered to the model if this item is selected by the user

label:String

Label to be rendered for this item in the response

description:String

Description of this item, for use in tools

disabled:boolean

Flag indicating that this option is disabled

escape:boolean

Flag indicating that the text of this option should be escaped when rendered.

noSelectionOption:boolean

Flag indicating that the current option is a "no selection" option

Since
1.2

Method Detail

getDescriptionback to summary
public String getDescription()

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

Returns:String

a description of this item, for use in development tools

getLabelback to summary
public String getLabel()

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

Returns:String

the label of this item

getValueback to summary
public Object getValue()

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

Returns:Object

the value of this item

isDisabledback to summary
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.

Returns:boolean

the disabled flag for this item

isEscapeback to summary
public boolean isEscape()

If and only if this returns true, the code that renders this select item must escape the label using escaping syntax appropriate to the content type being rendered.

Returns:boolean

the escape value.

Since
2.0
isNoSelectionOptionback to summary
public boolean isNoSelectionOption()

Return the value of the noSelectionOption property. If the value of this property is true, the system interprets the option represented by this SelectItem instance as representing a "no selection" option. See UISelectOne#validateValue and UISelectMany#validateValue for usage.

Returns:boolean

the value of the noSelectionOption property

Since
2.0
setDescriptionback to summary
public void setDescription(String description)

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

Parameters
description:String

The new description

setDisabledback to summary
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:boolean

The new disabled flag

setEscapeback to summary
public void setEscape(boolean escape)

Set the value of the escape property. See isEscape.

Parameters
escape:boolean

the new value of the escape property

Since
2.0
setLabelback to summary
public void setLabel(String label)

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

Parameters
label:String

The new label

setNoSelectionOptionback to summary
public void setNoSelectionOption(boolean noSelectionOption)

Set the value of the noSelectionOption property.

Parameters
noSelectionOption:boolean

the new value of the noSelectionOption property

Since
2.0
setValueback to summary
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:Object

The new value