| 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.CheckboxGroupRenderer
CheckboxGroupRenderer | public class CheckboxGroupRenderer extends SelectorGroupRenderer (Code) | | The CheckboxGroupRenderer renders a CheckboxGroup
component as set of checkboxes. The CheckboxGroupRenderer
creates an instance of Checkbox for each
Option instance in the Array , Map , or
Collection returned by the CheckboxGroup
getItems() method and renders them. It also creates
a Label component and renders it as the label for the group.
Zero or more checkboxes may be selected.
The value of the CheckboxGroup will determine
which checkboxes shall be initially selected and subsequetly hold
the current selections.
The checkboxes 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 checkbox 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.
- CHECKBOX_GROUP for the TABLE element.
- CHECKBOX_GROUP_CAPTION for the TD element containing the group label
- CHECKBOX_GROUP_LABEL for the LABEL element used as the CAPTION
- CHECKBOX_GROUP_LABEL_DISABLED for the LABEL used as the CAPTION if the
group is disabled
- CHECKBOX_GROUP_ROW_EVEN for even TR elements
- CHECKBOX_GROUP_ROW_ODD for odd TR elements
- CHECKBOX_GROUP_CELL_EVEN for even TD elements
- CHECKBOX_GROUP_CELL_ODD for odd TD elements
- CHECKBOX for the INPUT element
- CHECKBOX_DISABLED for the INPUT element for disabled checkbox
- CHECKBOX_LABEL for a LABEL element of a checkbox
- CHECKBOX_LABEL_DISABLED for a LABEL element of a disabled checkbox
- CHECKBOX_IMAGE for an IMG element of a checkbox
- CHECKBOX_IMAGE_DISABLED for an IMG element of a disabled checkbox
The name property of each checkbox is the component id of the
CheckboxGroup instance. The id of a Checkbox
component is cbgrpid_N where cbgrpid is the id of the
CheckboxGroup instance and _N is the nth checkbox.
The CheckboxGroup is decoded by identifying the
CheckboxGroup instance component id which is
returned as a request parameter. It represents the name attribute
of the selected checkbox's <input> element. The values of the
identified request parameter are assigned as the submitted value of the
CheckboxGroup component.
If the items property of the CheckboxGroup 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 Checkbox component to render. | protected String[] | getStyles() Return style constants for a Checkbox component. | public void | renderEnd(FacesContext context, UIComponent component, ResponseWriter writer) CheckboxGroupRenderer renders the entire CheckboxGroup
component within the renderEnd method. | public void | renderStart(FacesContext context, UIComponent component, ResponseWriter writer) Ensure that the component to be rendered is a CheckboxGroup instance. |
CheckboxGroupRenderer | public CheckboxGroupRenderer()(Code) | | Creates a new instance of CheckboxGroupRenderer
|
getSelectorComponent | protected UIComponent getSelectorComponent(FacesContext context, UIComponent component, Theme theme, String id, Option option)(Code) | | Return a Checkbox 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 Checkbox component.
|
renderEnd | public void renderEnd(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException(Code) | | CheckboxGroupRenderer renders the entire CheckboxGroup
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 CheckboxGroup instance.
Actual rendering occurs during the renderEnd method.
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)
|
|
|