| com.sun.rave.web.ui.component.SelectorBase com.sun.rave.web.ui.component.Selector com.sun.rave.web.ui.component.RbCbSelectorBase com.sun.rave.web.ui.component.RbCbSelector
All known Subclasses: com.sun.rave.web.ui.component.CheckboxBase, com.sun.rave.web.ui.component.RadioButtonBase,
RbCbSelector | public class RbCbSelector extends RbCbSelectorBase (Code) | | Superclass for Checkbox and RadioButton.
|
Method Summary | |
protected void | addToRequestMap(FacesContext context, String groupName) Implemented by subclasses in order to reflect the selection
state of this component id part of a group. | protected UIComponent | createImageComponent() Create a com.sun.rave.web.ui.component.ImageComponent
to represent the image for this component. | protected UIComponent | createLabelComponent() Create a com.sun.rave.web.ui.component.Label to represent
the label for this component. | public void | encodeBegin(FacesContext context) Encode the component. | public Object | getConvertedValue(FacesContext context, Object submittedValue) Convert the submittedValue argument.
If there is a renderer for this component,
its getConvertedValue() method is called and
the value returned by that method is returned. | public Object | getConvertedValue(FacesContext context, RbCbSelector component, Object submittedValue) Convert the submittedValue argument.
If submittedValue is not
an instance of String[] or
String a ConverterException is thrown.
The submittedValue indicates selected if it is
String[1].length() != 0 or
String.length() != 0 .
If not selected and getSelectedValue() returns an
instance of Boolean , Boolean.FALSE is
returned.
If not selected and it's not a boolean control then an unselected
value is returned appropriate for the type of the selected
property. | public UIComponent | getImageComponent() Returns a UIComponent that represents the image
for this component. | public UIComponent | getLabelComponent() Returns a UIComponent that represents the label
for this component. | public Object | getSelectedValue() Return the value of the selectedValue property. | public boolean | isChecked() Return true if the control is checked. |
IMAGE_FACET | final public static String IMAGE_FACET(Code) | | Image facet name.
|
LABEL_FACET | final public static String LABEL_FACET(Code) | | Label facet name.
|
RbCbSelector | public RbCbSelector()(Code) | | |
addToRequestMap | protected void addToRequestMap(FacesContext context, String groupName)(Code) | | Implemented by subclasses in order to reflect the selection
state of this component id part of a group.
This method is called if the component is part of a group.
Parameters: context - the context for this request. Parameters: groupName - the value of the name property. |
createImageComponent | protected UIComponent createImageComponent()(Code) | | Create a com.sun.rave.web.ui.component.ImageComponent
to represent the image for this component.
|
createLabelComponent | protected UIComponent createLabelComponent()(Code) | | Create a com.sun.rave.web.ui.component.Label to represent
the label for this component.
|
encodeBegin | public void encodeBegin(FacesContext context) throws IOException(Code) | | Encode the component.
If this component is part of a group, ensure that the initial
state is reflected in the request map by calling
addToRequestMap .
Parameters: context - the context for this request. |
getConvertedValue | public Object getConvertedValue(FacesContext context, Object submittedValue) throws ConverterException(Code) | | Convert the submittedValue argument.
If there is a renderer for this component,
its getConvertedValue() method is called and
the value returned by that method is returned.
If there is no renderer, and submittedValue is not
an instance of String[] or
String a ConverterException is thrown.
The submittedValue indicates selected if it is
String[1].length() != 0 or
String.length() != 0 .
If not selected and getSelectedValue() returns an
instance of Boolean , Boolean.FALSE is
returned.
If not selected and it's not a boolean control then an unselected
value is returned appropriate for the type of the selected
property. If the type of the selected property evaluates
to a primitive type by virtue of a value binding the appropriate
MIN_VALUE constant is returned. For example if the
type is int , new Integer(Integer.MIN_VALUE)
is returned.
If the type is not a primitive value "" is returned.
If the control is selected
ConversionUtilities.convertValueToObject() is called to
convert submittedValue .
If ConversionUtilities.convertValueToObject() returns
submittedValue , the value of the
getSelectedValue() property
is returned, else the value returned by
ConversionUtilities.convertValueToObject() is returned.
Parameters: context - the context of this request. Parameters: submittedValue - the submitted String value of this component. |
getConvertedValue | public Object getConvertedValue(FacesContext context, RbCbSelector component, Object submittedValue) throws ConverterException(Code) | | Convert the submittedValue argument.
If submittedValue is not
an instance of String[] or
String a ConverterException is thrown.
The submittedValue indicates selected if it is
String[1].length() != 0 or
String.length() != 0 .
If not selected and getSelectedValue() returns an
instance of Boolean , Boolean.FALSE is
returned.
If not selected and it's not a boolean control then an unselected
value is returned appropriate for the type of the selected
property. If the type of the selected property evaluates
to a primitive type by virtue of a value binding the appropriate
MIN_VALUE constant is returned. For example if the
type is int , new Integer(Integer.MIN_VALUE)
is returned.
If the type is not a primitive value "" is returned.
If the control is selected
ConversionUtilities.convertValueToObject() is called to
convert submittedValue .
If ConversionUtilities.convertValueToObject() returns
submittedValue , the value of the
getSelectedValue() property
is returned, else the value returned by
ConversionUtilities.convertValueToObject() is returned.
Parameters: context - the context of this request. Parameters: component - an RbCbSelector instance. Parameters: submittedValue - the submitted String value of this component. |
getImageComponent | public UIComponent getImageComponent()(Code) | | Returns a UIComponent that represents the image
for this component.
If an "image" facet exists, the UIComponent associated
with that facet is returned.
If an "image" facet does not exist and the imageURL
property is not null, createImageComponent() is called
to create the image component.
|
getLabelComponent | public UIComponent getLabelComponent()(Code) | | Returns a UIComponent that represents the label
for this component.
If a "label" facet exists, the UIComponent associated
with that facet is returned.
If a "label" facet does not exist and the label
property is not null, createLabelComponent is called
to create the label component.
|
getSelectedValue | public Object getSelectedValue()(Code) | | Return the value of the selectedValue property.
If selectedValue is null, then a Boolean
true instance is returned and the control will behave as a
boolean control.
|
isChecked | public boolean isChecked()(Code) | | Return true if the control is checked.
A control is checked when the selectedValue property is
equal to the selected property.
|
|
|