| |
|
| com.sun.rave.web.ui.component.SelectorBase com.sun.rave.web.ui.component.Selector com.sun.rave.web.ui.component.ListSelectorBase com.sun.rave.web.ui.component.ListSelector
All known Subclasses: com.sun.rave.web.ui.component.ListboxBase, com.sun.rave.web.ui.component.AddRemoveBase, com.sun.rave.web.ui.component.DropDownBase,
Method Summary | |
public void | checkSelectionModel(FacesContext context) Check that this component has a valuebinding that matches the
value of the "multiple" attribute. | protected ListItem | createListItem(Option si) | public UIComponent | getLabelComponent() Return a component that implements the label for this ListSelector.
If a facet named label is found
that component is returned. | public Iterator | getListItems(FacesContext context, boolean rulerAtEnd) Retrieve an Iterator of ListSelector.ListItem, to be used by the
renderer. | public Iterator | getListItems() Retrieve an Iterator of ListSelector.ListItem, to be used when
evaluting the list items. | protected Option[] | getOptions() Processes the component's SelectItems. | public String | getPrimaryElementID(FacesContext context) | public UIComponent | getReadOnlyValueComponent() | public int | getSeparatorLength() This method resets the options. | public String | getValueAsReadOnly(FacesContext context, String separator) Return a string suitable for displaying the value in read only mode. | public String[] | getValueAsStringArray(FacesContext context) Get the value (the object representing the selection(s)) of this
component as a String array. | public boolean | mainListSubmits() | protected void | markSelectedListItems(java.util.List list, boolean processed) Marks options corresponding to objects listed as values of this
components as selected.
Parameters: list - A list representation of the selected values Parameters: processed - If true, compare the values object byobject (this is done if we compare the value of the object withwith the list items). | protected void | processOptions(Option[] options) | protected void | processSelections() Retrieve the current selections and compare them with the list
items. |
ListSelector | public ListSelector()(Code) | | Creates a new instance of ListSelector
|
checkSelectionModel | public void checkSelectionModel(FacesContext context)(Code) | | Check that this component has a valuebinding that matches the
value of the "multiple" attribute.
Parameters: context - The FacesContext of the request |
getLabelComponent | public UIComponent getLabelComponent()(Code) | | Return a component that implements the label for this ListSelector.
If a facet named label is found
that component is returned. Otherwise a Label component
is returned. It is assigned the id
getId() + "_label"
If the facet is not defined then the returned Label
component is re-intialized every time this method is called.
a label component for this ListSelector |
getListItems | public Iterator getListItems(FacesContext context, boolean rulerAtEnd) throws FacesException(Code) | | Retrieve an Iterator of ListSelector.ListItem, to be used by the
renderer.
an Iterator over ListItem. |
getListItems | public Iterator getListItems() throws FacesException(Code) | | Retrieve an Iterator of ListSelector.ListItem, to be used when
evaluting the list items. If the list items are needed by the
renderer, use getListItems(context, rulerAtEnd) instead.
an Iterator over ListItem. |
getOptions | protected Option[] getOptions()(Code) | | Processes the component's SelectItems. Constructs an ArrayList
of Selector.Options.
- General algorithm copied from the RI, except that I modified
the class casts for readability. I don't think the algorithm is
correct though, need to verify.
- The list of allowed data types must match the spec.
- This code will have to be replaced when switching
to Selection.
|
getPrimaryElementID | public String getPrimaryElementID(FacesContext context)(Code) | | |
getReadOnlyValueComponent | public UIComponent getReadOnlyValueComponent()(Code) | | |
getSeparatorLength | public int getSeparatorLength()(Code) | | This method resets the options. Use this only if you need to
add or remove options after the component has been rendered once.
public void resetOptions() {
listItems = null;
}
|
getValueAsReadOnly | public String getValueAsReadOnly(FacesContext context, String separator)(Code) | | Return a string suitable for displaying the value in read only mode.
The default is to separate the list values with a comma.
Parameters: context - The FacesContext throws: javax.faces.FacesException - If the list items cannot be processed |
getValueAsStringArray | public String[] getValueAsStringArray(FacesContext context)(Code) | | Get the value (the object representing the selection(s)) of this
component as a String array.
Parameters: context - The FacesContext of the request |
mainListSubmits | public boolean mainListSubmits()(Code) | | |
markSelectedListItems | protected void markSelectedListItems(java.util.List list, boolean processed)(Code) | | Marks options corresponding to objects listed as values of this
components as selected.
Parameters: list - A list representation of the selected values Parameters: processed - If true, compare the values object byobject (this is done if we compare the value of the object withwith the list items). If false, perform a string comparison ofthe string representation of the submitted value of thecomponent with the string representation of the value from thelist items (this is done if we compare the submitted valueswith the list items). |
processOptions | protected void processOptions(Option[] options)(Code) | | |
processSelections | protected void processSelections()(Code) | | Retrieve the current selections and compare them with the list
items.
|
|
|
|