com.sun.rave.web.ui.component
Interface ListManager

All Superinterfaces:
ComplexComponent, javax.faces.component.EditableValueHolder, SelectorManager, javax.faces.component.ValueHolder
All Known Implementing Classes:
AddRemove, EditableList, ListSelector, OrderableList

public interface ListManager
extends javax.faces.component.EditableValueHolder, SelectorManager, ComplexComponent

This interface is used to allow both list components which allow the user to select from a set of Options (e.g. Listbox, AddRemove) and list components which allow the user to edit a list to use the same renderer. TODO: consider making this a base class instead. There is code which is shared between Selectors and Editable List, Orderable List. (getConvertedValue, getValueAsString, ...)

Author:
avk

Method Summary
 java.util.Iterator getListItems(javax.faces.context.FacesContext context, boolean rulerAtEnd)
          Get an Iterator of the items to display.
 javax.faces.component.UIComponent getReadOnlyValueComponent()
          Returns a UIComponent used to display the readonly value for this component
 int getRows()
          Get the number of rows to display (the size of the HTML select element)
 java.lang.String getToolTip()
          Retrieves the tooltip for the list
 java.lang.String[] getValueAsStringArray(javax.faces.context.FacesContext context)
          Get the value of the component as a String array.
 boolean isVisible()
           
 boolean mainListSubmits()
           
 
Methods inherited from interface javax.faces.component.EditableValueHolder
addValidator, addValueChangeListener, getSubmittedValue, getValidator, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, removeValidator, removeValueChangeListener, setImmediate, setLocalValueSet, setRequired, setSubmittedValue, setValid, setValidator, setValueChangeListener
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, getValue, setConverter, setValue
 
Methods inherited from interface com.sun.rave.web.ui.component.SelectorManager
getClientId, getOnChange, getStyle, getStyleClass, getTabIndex, isDisabled, isMultiple, isReadOnly
 
Methods inherited from interface com.sun.rave.web.ui.component.ComplexComponent
getPrimaryElementID
 

Method Detail

getListItems

public java.util.Iterator getListItems(javax.faces.context.FacesContext context,
                                       boolean rulerAtEnd)
Get an Iterator of the items to display. The items are of type com.sun.rave.web.ui.model.list.ListItem and are an abstraction over different types of actual data to be used by the renderer

Parameters:
rulerAtEnd - If this attribute is set to true, the iterator will contain, as the last item, a disabled list option with a blank label whose sole function is to guarantee that the list stays the same size
Returns:
An Iterator of com.sun.rave.web.ui.model.list.ListItem

getToolTip

public java.lang.String getToolTip()
Retrieves the tooltip for the list

Returns:
A string with the text for the tool tip

getValueAsStringArray

public java.lang.String[] getValueAsStringArray(javax.faces.context.FacesContext context)
Get the value of the component as a String array. The array consists of the converted value of each list item is shown.

Parameters:
context - The FacesContext of the request
Returns:
A string representation of the value

getRows

public int getRows()
Get the number of rows to display (the size of the HTML select element)

Returns:
The size of the list

getReadOnlyValueComponent

public javax.faces.component.UIComponent getReadOnlyValueComponent()
Returns a UIComponent used to display the readonly value for this component

Returns:
a UIComponent used to display the readonly value for this component

isVisible

public boolean isVisible()

mainListSubmits

public boolean mainListSubmits()