Top Description Fields Constructors Methods
javax.faces.component

public Class UISelectBoolean

extends UIInput
Class Inheritance
Known Direct Subclasses
javax.faces.component.html.HtmlSelectBooleanCheckbox
Imports
javax.el.ValueExpression, javax.faces.el.ValueBinding

UISelectBoolean is a UIComponent that represents a single boolean (true or false) value. It is most commonly rendered as a checkbox.

By default, the rendererType property must be set to "javax.faces.Checkbox". This value can be changed by calling the setRendererType() method.

Field Summary

Modifier and TypeField and Description
public static final String
COMPONENT_FAMILY

Hides javax.faces.component.UIInput.COMPONENT_FAMILY.

The standard component family for this component.

public static final String
COMPONENT_TYPE

Hides javax.faces.component.UIInput.COMPONENT_TYPE.

The standard component type for this component.

Inherited from javax.faces.component.UIInput:
ALWAYS_PERFORM_VALIDATION_WHEN_REQUIRED_IS_TRUECONVERSION_MESSAGE_IDEMPTY_STRING_AS_NULL_PARAM_NAMEREQUIRED_MESSAGE_IDUPDATE_MESSAGE_IDVALIDATE_EMPTY_FIELDS_PARAM_NAMEvalidators

Constructor Summary

AccessConstructor and Description
public
UISelectBoolean()

Create a new UISelectBoolean instance with default property values.

Method Summary

Modifier and TypeMethod and Description
public String
getFamily()

Overrides javax.faces.component.UIInput.getFamily.

Return the identifier of the component family to which this component belongs.

public ValueBinding
getValueBinding(String
Name of the attribute or property for which to retrieve a ValueBinding
name
)

Overrides javax.faces.component.UIComponentBase.getValueBinding.

Deprecated This has been replaced by getValueExpression.

Return any ValueBinding set for value if a ValueBinding for selected is requested; otherwise, perform the default superclass processing for this method.

public ValueExpression
getValueExpression(String
Name of the attribute or property for which to retrieve a ValueExpression
name
)

Overrides javax.faces.component.UIComponent.getValueExpression.

Return any ValueExpression set for value if a ValueExpression for selected is requested; otherwise, perform the default superclass processing for this method.

public boolean

Returns:

true if selected, false otherwise.
isSelected
()

Return the local value of the selected state of this component.

public void
setSelected(boolean
The new selected state
selected
)

Set the local value of the selected state of this component.

public void
setValueBinding(String
Name of the attribute or property for which to set a ValueBinding
name
,
ValueBinding
The ValueBinding to set, or null to remove any currently set ValueBinding
binding
)

Overrides javax.faces.component.UIComponentBase.setValueBinding.

Deprecated This has been replaced by setValueExpression.

Store any ValueBinding specified for selected under value instead; otherwise, perform the default superclass processing for this method.

public void
setValueExpression(String
Name of the attribute or property for which to set a ValueExpression
name
,
ValueExpression
The ValueExpression to set, or null to remove any currently set ValueExpression
binding
)

Overrides javax.faces.component.UIComponent.setValueExpression.

Store any ValueExpression specified for selected under value instead; otherwise, perform the default superclass processing for this method.

Inherited from javax.faces.component.UIInput:
addValidatoraddValueChangeListenerclearInitialStatecompareValuesdecodegetConvertedValuegetConverterMessagegetRequiredMessagegetSubmittedValuegetValidatorgetValidatorMessagegetValidatorsgetValuegetValueChangeListenergetValueChangeListenersisEmptyisImmediateisLocalValueSetisRequiredisValidmarkInitialStateprocessDecodesprocessUpdatesprocessValidatorsremoveValidatorremoveValueChangeListenerresetValuerestoreStatesaveStatesetConverterMessagesetImmediatesetLocalValueSetsetRequiredsetRequiredMessagesetSubmittedValuesetValidsetValidatorsetValidatorMessagesetValuesetValueChangeListenerupdateModelvalidatevalidateValue

Field Detail

COMPONENT_FAMILYback to summary
public static final String COMPONENT_FAMILY

Hides javax.faces.component.UIInput.COMPONENT_FAMILY.

The standard component family for this component.

COMPONENT_TYPEback to summary
public static final String COMPONENT_TYPE

Hides javax.faces.component.UIInput.COMPONENT_TYPE.

The standard component type for this component.

Constructor Detail

UISelectBooleanback to summary
public UISelectBoolean()

Create a new UISelectBoolean instance with default property values.

Method Detail

getFamilyback to summary
public String getFamily()

Overrides javax.faces.component.UIInput.getFamily.

Doc from javax.faces.component.UIComponent.getFamily.

Return the identifier of the component family to which this component belongs. This identifier, in conjunction with the value of the rendererType property, may be used to select the appropriate Renderer for this component instance. Note this method should NOT return null

Returns:String

the component family (not null).

Annotations
@Override
getValueBindingback to summary
public ValueBinding getValueBinding(String name)

Overrides javax.faces.component.UIComponentBase.getValueBinding.

Deprecated

This has been replaced by getValueExpression.

Return any ValueBinding set for value if a ValueBinding for selected is requested; otherwise, perform the default superclass processing for this method.

Rely on the superclass implementation to wrap the returned ValueExpression in a ValueBinding.

Parameters
name:String

Name of the attribute or property for which to retrieve a ValueBinding

Returns:ValueBinding

Doc from javax.faces.component.UIComponent.getValueBinding.

the value binding.

Annotations
@Override
Exceptions
NullPointerException:
if name is null
getValueExpressionback to summary
public ValueExpression getValueExpression(String name)

Overrides javax.faces.component.UIComponent.getValueExpression.

Return any ValueExpression set for value if a ValueExpression for selected is requested; otherwise, perform the default superclass processing for this method.

Parameters
name:String

Name of the attribute or property for which to retrieve a ValueExpression

Returns:ValueExpression

Doc from javax.faces.component.UIComponent.getValueExpression.

the value expression, or null.

Annotations
@Override
Exceptions
NullPointerException:
if name is null
Since
1.2
isSelectedback to summary
public boolean isSelected()

Return the local value of the selected state of this component. This method is a typesafe alias for getValue().

Returns:boolean

true if selected, false otherwise.

setSelectedback to summary
public void setSelected(boolean selected)

Set the local value of the selected state of this component. This method is a typesafe alias for setValue().

Parameters
selected:boolean

The new selected state

setValueBindingback to summary
public void setValueBinding(String name, ValueBinding binding)

Overrides javax.faces.component.UIComponentBase.setValueBinding.

Deprecated

This has been replaced by setValueExpression.

Store any ValueBinding specified for selected under value instead; otherwise, perform the default superclass processing for this method.

Rely on the superclass implementation to wrap the argument ValueBinding in a ValueExpression.

Parameters
name:String

Name of the attribute or property for which to set a ValueBinding

binding:ValueBinding

The ValueBinding to set, or null to remove any currently set ValueBinding

Annotations
@Override
Exceptions
NullPointerException:
if name is null
setValueExpressionback to summary
public void setValueExpression(String name, ValueExpression binding)

Overrides javax.faces.component.UIComponent.setValueExpression.

Store any ValueExpression specified for selected under value instead; otherwise, perform the default superclass processing for this method.

Parameters
name:String

Name of the attribute or property for which to set a ValueExpression

binding:ValueExpression

The ValueExpression to set, or null to remove any currently set ValueExpression

Annotations
@Override
Exceptions
NullPointerException:
if name is null
Since
1.2