| com.sun.rave.web.ui.renderer.AbstractRenderer com.sun.rave.web.ui.renderer.RowColumnRenderer com.sun.rave.web.ui.renderer.SelectorGroupRenderer com.sun.rave.web.ui.renderer.RadioButtonGroupRenderer
RadioButtonGroupRenderer | public class RadioButtonGroupRenderer extends SelectorGroupRenderer (Code) | | The RadioButtonRenderer renders a RadioButtonGroup
component as set of radio buttons. The RadioButtonGroupRenderer
creates an instance of RadioButton for each
Option instance in the Array , Map , or
Collection returned by the RadioButtonGroup
getItems() method and renders them. It also
creates a Label component and renders it as the label for the
group.
Only one radio button may be selected at any time and one radio button
must always be selected. The value of the RadioButtonGroup
will determine which radio button shall be initially selected.
Subsequently, the RadioButtonGroup 's value holds the
currently selected radio button value.
The radio buttons are rendered as a single column or some number of
rows and columns. The rows and columns are rendered as a table as
defined by the
com.sun.rave.web.ui.renderer.RowColumnRenderer superclass.
The elements
that make up the radio button occupy a cell in the table.
The style class selector for the group elements is identified by a java
constants defined in the
com.sun.rave.web.ui.theme.ThemeStyles class.
- RADIOBUTTON_GROUP for the TABLE element.
- RADIOBUTTON_GROUP_CAPTION for the TD element containing the group
label
- RADIOBUTTON_GROUP_LABEL for the LABEL element used as the CAPTION
- RADIOBUTTON_GROUP_LABEL_DISABLED for the LABEL used as the CAPTION if
the group is disabled
- RADIOBUTTON_GROUP_ROW_EVEN for even TR elements
- RADIOBUTTON_GROUP_ROW_ODD for odd TR elements
- RADIOBUTTON_GROUP_CELL_EVEN for even TD elements
- RADIOBUTTON_GROUP_CELL_ODD for odd TD elements
- RADIOBUTTON for the INPUT element
- RADIOBUTTON_DISABLED for the INPUT element for disabled radio
button
- RADIOBUTTON_LABEL for a LABEL element of a radio button
- RADIOBUTTON_LABEL_DISABLED for a LABEL element of a disabled radio
button
- RADIOBUTTON_IMAGE for an IMG element of a radio button
- RADIOBUTTON_IMAGE_DISABLED for an IMG element of a disabled radio
button
The name property of each radio button is the component id of
the RadioButtonGroup instance. The id of a
RadioButton component is rbgrpid_N where
rbgrpid is the id of the
RadioButtonGroup instance and _N is the nth
radio button.
The RadioButtonGroup is decoded by identifying the
RadioButtonGroup instance component id which is
returned as a request parameter. It represents the name attribute
of the selected radio button's <input> element. The value of
the identified request parameter is assigned as the submitted value of the
RadioButtonGroup component.
If the items property of the RadioButtonGroup is null or
zero length no output is produced.
|
Method Summary | |
protected UIComponent | getSelectorComponent(FacesContext context, UIComponent component, Theme theme, String id, Option option) Return a RadioButton component to render. | protected String[] | getStyles() Return style constants for a RadioButton component. | public void | renderEnd(FacesContext context, UIComponent component, ResponseWriter writer) RadioButtonGroupRenderer renders the entire RadioButtonGroup
component within the renderEnd method. | public void | renderStart(FacesContext context, UIComponent component, ResponseWriter writer) Ensure that the component to be rendered is a RadioButtonGroup instance. |
RadioButtonGroupRenderer | public RadioButtonGroupRenderer()(Code) | | Creates a new instance of RadioButtonGroupRenderer
|
getSelectorComponent | protected UIComponent getSelectorComponent(FacesContext context, UIComponent component, Theme theme, String id, Option option)(Code) | | Return a RadioButton component to render.
Parameters: context - FacesContext for the current request Parameters: component - CheckboxGroup component rendered Parameters: theme - Theme for the component Parameters: option - the Option being rendered. |
getStyles | protected String[] getStyles()(Code) | | Return style constants for a RadioButton component.
|
renderEnd | public void renderEnd(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException(Code) | | RadioButtonGroupRenderer renders the entire RadioButtonGroup
component within the renderEnd method.
Parameters: context - FacesContext for the request we are processing. Parameters: component - UIComponent to be decoded. |
renderStart | public void renderStart(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException(Code) | | Ensure that the component to be rendered is a RadioButtonGroup instance.
Actual rendering occurs during renderEnd
Parameters: context - FacesContext for the request we are processing. Parameters: component - UIComponent to be decoded. |
Methods inherited from com.sun.rave.web.ui.renderer.SelectorGroupRenderer | public void decode(FacesContext context, UIComponent component)(Code)(Java Doc) public void encodeChildren(FacesContext context, UIComponent component) throws IOException(Code)(Java Doc) protected Option[] getItems(Selector selector)(Code)(Java Doc) final protected String getRowColumnStyle(Theme theme, int styleCode)(Code)(Java Doc) abstract protected UIComponent getSelectorComponent(FacesContext context, UIComponent component, Theme theme, String id, Option option)(Code)(Java Doc) protected String getStyle(Theme theme, int styleCode, int styleLevelCode)(Code)(Java Doc) abstract protected String[] getStyles()(Code)(Java Doc) protected void renderCaption(FacesContext context, UIComponent component, Theme theme, ResponseWriter writer) throws IOException(Code)(Java Doc) protected void renderCellContent(FacesContext context, UIComponent component, Theme theme, ResponseWriter writer, int itemN) throws IOException(Code)(Java Doc) protected void renderEmptyCell(FacesContext context, UIComponent component, Theme theme, ResponseWriter writer) throws IOException(Code)(Java Doc) protected void renderSelectorGroup(FacesContext context, UIComponent component, Theme theme, ResponseWriter writer, int columns) throws IOException(Code)(Java Doc) protected void transferEventAttributes(Selector group, RbCbSelector rbcb)(Code)(Java Doc)
|
Methods inherited from com.sun.rave.web.ui.renderer.RowColumnRenderer | abstract protected String getRowColumnStyle(Theme theme, int styleCode)(Code)(Java Doc) abstract protected void renderCaption(FacesContext context, UIComponent component, Theme theme, ResponseWriter writer) throws IOException(Code)(Java Doc) abstract protected void renderCellContent(FacesContext context, UIComponent component, Theme theme, ResponseWriter writer, int itemN) throws IOException(Code)(Java Doc) protected void renderRowColumnLayout(FacesContext context, UIComponent component, Theme theme, ResponseWriter writer, int rows, int columns) throws IOException(Code)(Java Doc)
|
Methods inherited from com.sun.rave.web.ui.renderer.AbstractRenderer | protected void addBooleanAttributes(FacesContext context, UIComponent component, ResponseWriter writer, String names) throws IOException(Code)(Java Doc) protected void addCoreAttributes(FacesContext context, UIComponent component, ResponseWriter writer, String styles) throws IOException(Code)(Java Doc) protected void addIntegerAttributes(FacesContext context, UIComponent component, ResponseWriter writer, String names) throws IOException(Code)(Java Doc) protected static void addStringAttributes(FacesContext context, UIComponent component, ResponseWriter writer, String names) throws IOException(Code)(Java Doc) public void decode(FacesContext context, UIComponent component)(Code)(Java Doc) public void encodeBegin(FacesContext context, UIComponent component) throws IOException(Code)(Java Doc) public void encodeChildren(FacesContext context, UIComponent component) throws IOException(Code)(Java Doc) public void encodeEnd(FacesContext context, UIComponent component) throws IOException(Code)(Java Doc) protected Application getApplication()(Code)(Java Doc) protected Object getAsObject(FacesContext context, UIComponent component, String value)(Code)(Java Doc) protected String getAsString(FacesContext context, UIComponent component)(Code)(Java Doc) protected ExternalContext getExternalContext()(Code)(Java Doc) protected FacesContext getFacesContext()(Code)(Java Doc) protected Object getSubmittedValue(FacesContext context, UIComponent component)(Code)(Java Doc) protected boolean isDisabled(UIComponent component)(Code)(Java Doc) protected boolean isPortlet(FacesContext context)(Code)(Java Doc) protected boolean isReadOnly(UIComponent component)(Code)(Java Doc) protected void renderAttributes(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException(Code)(Java Doc) protected void renderEnd(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException(Code)(Java Doc) protected void renderMarkup(FacesContext context, UIComponent component, ResponseWriter writer, Markup markup) throws IOException(Code)(Java Doc) protected void renderStart(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException(Code)(Java Doc) protected void setSubmittedValue(FacesContext context, UIComponent component)(Code)(Java Doc)
|
|
|