| |
|
| com.sun.rave.web.ui.component.EditableListBase com.sun.rave.web.ui.component.EditableList
EditableList | public class EditableList extends EditableListBase implements ListManager(Code) | | About this tag.
This tag renders an EditableList component. Use this component
when web application users need to create and modify a list of
strings. The application user can add new strings by typing them
into the textfield and clicking the "Add" button, and remove them
by selecting one or more items from the list and clicking the
"Remove" button.
Configuring the listbox tag
Use the list attribute to bind the component
to a model. The value must be an EL expression that corresponds to
a managed bean or a property of a managed bean, and it must
evaluate to an array of java.lang.String .
To set the label of the textfield, use the
fieldLabel attribute. To set the label of the
textfield, use the listLabel attribute. To validate
new items, use the fieldValidator attribute; to
validate the contents of the list once the user has finished
adding and removing items, specify a labelValidator .
Facets
fieldLabel : use this facet to specify a custom
component for the textfield label.
listLabel : use this facet to specify a custom
component for the textfield label.
field : use this facet to specify a custom
component for the textfield.
addButton : use this facet to specify a custom
component for the add button.
removeButton : use this facet to specify a custom
component for the remove button.
search : use this facet to specify a custom
component for the search button.
readOnly : use this facet to specify a custom
component for display a readonly version of the component.
header : use this facet to specify a header,
rendered in a table row above the component.
footer : use this facet to specify a header,
rendered in a table row below the component.
Client-side JavaScript functions
author: avk |
ADD_BUTTON_FACET | final public static String ADD_BUTTON_FACET(Code) | | |
ADD_BUTTON_ID | final public static String ADD_BUTTON_ID(Code) | | The component id for the ADD button
|
ADD_FUNCTION | final public static String ADD_FUNCTION(Code) | | Name of the JavaScript function which is responsible for adding elements from the availble list to the selected list
|
ENABLE_ADD_FUNCTION | final public static String ENABLE_ADD_FUNCTION(Code) | | Name of the JavaScript function which is responsible for
enabling/disabling the add button
|
ENABLE_REMOVE_FUNCTION | final public static String ENABLE_REMOVE_FUNCTION(Code) | | Name of the JavaScript function which is responsible for
enabling/disabling the remove button
|
FIELD_ID | final public static String FIELD_ID(Code) | | The component ID for the textfield
|
FIELD_LABEL_FACET | final public static String FIELD_LABEL_FACET(Code) | | |
FIELD_LABEL_ID | final public static String FIELD_LABEL_ID(Code) | | The component ID for the textfield
|
FOOTER_FACET | final public static String FOOTER_FACET(Code) | | Facet name for the footer facet
|
HEADER_FACET | final public static String HEADER_FACET(Code) | | Facet name for the header facet
|
JSOBJECT | final public static String JSOBJECT(Code) | | The name of the component attribute that stores the name of the JavaScript object that organizes the JavsSCript functions for the component
|
LIST_LABEL_FACET | final public static String LIST_LABEL_FACET(Code) | | |
LIST_LABEL_ID | final public static String LIST_LABEL_ID(Code) | | The component ID for the textfield
|
READ_ONLY_FACET | final public static String READ_ONLY_FACET(Code) | | |
READ_ONLY_ID | final public static String READ_ONLY_ID(Code) | | The component ID for the textfield
|
REMOVE_BUTTON_FACET | final public static String REMOVE_BUTTON_FACET(Code) | | |
REMOVE_BUTTON_ID | final public static String REMOVE_BUTTON_ID(Code) | | The component ID for the remove button
|
SEARCH_FACET | final public static String SEARCH_FACET(Code) | | Facet name for the search facet
|
SET_ADD_DISABLED_FUNCTION | final public static String SET_ADD_DISABLED_FUNCTION(Code) | | Name of the JavaScript function which is responsible for
enabling/disabling the add button
|
UPDATE_BUTTONS_FUNCTION | final public static String UPDATE_BUTTONS_FUNCTION(Code) | | Name of the JavaScript function that updates the buttons
|
compareValues | protected boolean compareValues(Object previous, Object value)(Code) | | Return true if the new value is different from the
previous value.
This only implements a compareValues for value if it is an Array.
If value is not an Array, defer to super.compareValues.
The assumption is that the ordering of the elements
between the previous value and the new value is determined
in the same manner.
Another assumption is that the two object arguments
are of the same type, both arrays of both not arrays.
Parameters: previous - old value of this component (if any) Parameters: value - new value of this component (if any) |
getAddButtonComponent | public UIComponent getAddButtonComponent()(Code) | | Get or create the ADD button. Retrieves the component specified by the
addButton facet (if there is one) or creates a new Button component.
A UI Component for the Add button |
getConvertedValue | public Object getConvertedValue(FacesContext context, Object submittedValue) throws ConverterException(Code) | | Retrieve the value of this component (the "selected" property) as an
object. This method is invoked by the JSF engine during the validation
phase. The JSF default behaviour is for components to defer the
conversion and validation to the renderer, but for the Selector based
components, the renderers do not share as much functionality as the
components do, so it is more efficient to do it here.
Parameters: context - The FacesContext of the request Parameters: submittedValue - The submitted value of the component |
getFieldComponent | public UIComponent getFieldComponent()(Code) | | Gets or creates a component for the textfield. Retrieves the
field facet if one was specified, or creates a new TextField component.
A UIComponent for the textfield |
getFieldLabelComponent | public UIComponent getFieldLabelComponent()(Code) | | Gets or creates a component for the textfield label. Retrieves the
fieldLabel facet if one was specified, or creates a new label component.
A UIComponent for the field label |
getJavaScriptObjectName | public String getJavaScriptObjectName()(Code) | | |
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. throws: javax.faces.FacesException - |
getListLabelComponent | public UIComponent getListLabelComponent()(Code) | | Gets or creates a component for the list label. Retrieves the
listLabel facet if one was specified, or creates a new label component.
A UIComponent for the list label |
getMaxlLength | public int getMaxlLength()(Code) | | Get the maximum length of the strings on the list
An integer value for the maximum number of characters on the list |
getPrimaryElementID | public String getPrimaryElementID(FacesContext context)(Code) | | |
getReadOnlyValueComponent | public UIComponent getReadOnlyValueComponent()(Code) | | Creates a component for the EditableList in case the component
is read-only.
A UIComponent that displays the read-only value |
getRemoveButtonComponent | public UIComponent getRemoveButtonComponent()(Code) | | Get or create the REMOVE button. Retrieves the component specified by the
removeButton facet (if there is one) or creates a new Button component.
A UI Component for the REMOVE button |
getValueAsReadOnly | protected String getValueAsReadOnly(FacesContext context) throws FacesException(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) | | |
getValuesToRemove | public String[] getValuesToRemove()(Code) | | Getter for property valuesToRemove.
Value of property valuesToRemove. |
isImmediate | public boolean isImmediate()(Code) | | Always returns false for EditableList *
|
mainListSubmits | public boolean mainListSubmits()(Code) | | |
processAddAction | public void processAddAction()(Code) | | |
processRemoveAction | public void processRemoveAction()(Code) | | |
setConverter | public void setConverter(javax.faces.convert.Converter converter)(Code) | | Parameters: converter - |
setValuesToRemove | public void setValuesToRemove(String[] valuesToRemove)(Code) | | Setter for property valuesToRemove.
Parameters: valuesToRemove - New value of property valuesToRemove. |
|
|
|