com.sun.rave.web.ui.component
Class EditableListBase

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byjavax.faces.component.UIComponentBase
          extended byjavax.faces.component.UIOutput
              extended byjavax.faces.component.UIInput
                  extended bycom.sun.rave.web.ui.component.EditableListBase
All Implemented Interfaces:
javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder
Direct Known Subclasses:
EditableList

public abstract class EditableListBase
extends javax.faces.component.UIInput

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 ui:editableList 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

Client-side JavaScript functions

Example

         <ui:editableList id="compid"
                          list="#{ListBean.list}" 
                          fieldLabel="#{msgs.textfield_label}"
                          listLabel="#{msgs.list_label}"
                          sorted="true" 
 			 searchButton="true"
                          fieldValidator="#{ListBean.validateNewItem}"
                          listValidator="#{ListBean.validateList}"/>
 
 

Auto-generated component class. Do NOT modify; all changes will be lost!


Field Summary
 
Fields inherited from class javax.faces.component.UIInput
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID
 
Constructor Summary
EditableListBase()
          Construct a new EditableListBase.
 
Method Summary
 java.lang.String getFamily()
          Return the family for this component.
 java.lang.String getFieldLabel()
          The label of the text field
 javax.faces.el.MethodBinding getFieldValidator()
           A validator which will be applied to entries made into the textfield.
 int getLabelLevel()
          Sets the style level for the generated labels.
 java.lang.Object getList()
           The object that represents the list.
 java.lang.String getListLabel()
          The label of the list
 javax.faces.el.MethodBinding getListValidator()
           A validator which will be applied to the contents of the list (e.g.
 int getMaxLength()
          The maximum number of characters allowed for each string in the list.
 int getRows()
          The number of items to display.
 java.lang.String getStyle()
          CSS style(s) to be applied when this component is rendered.
 java.lang.String getStyleClass()
          CSS style class(es) to be applied when this component is rendered.
 int getTabIndex()
          The position of this component in the tabbing order sequence
 java.lang.String getToolTip()
          Display the text as a tooltip for this component
 javax.faces.el.ValueBinding getValueBinding(java.lang.String name)
          Return the ValueBinding stored for the specified name (if any), respecting any property aliases.
 boolean isDisabled()
          Flag indicating that the user is not permitted to activate this component, and that the component's value will not be submitted with the form.
 boolean isListOnTop()
          Flag indicating whether the list should be on top of the textfield or vice versa.
 boolean isMultiple()
          Flag indicating that the application user may make select more than one option from the listbox .
 boolean isReadOnly()
          If this attribute is set to true, the value of the component is rendered as text, preceded by the label if one was defined.
 boolean isSorted()
          Set this attribute to true if the list items should be sorted.
 boolean isVisible()
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
          Restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext _context)
          Save the state of this component.
 void setDisabled(boolean disabled)
          Flag indicating that the user is not permitted to activate this component, and that the component's value will not be submitted with the form.
 void setFieldLabel(java.lang.String fieldLabel)
          The label of the text field
 void setFieldValidator(javax.faces.el.MethodBinding fieldValidator)
           A validator which will be applied to entries made into the textfield.
 void setLabelLevel(int labelLevel)
          Sets the style level for the generated labels.
 void setList(java.lang.Object list)
           The object that represents the list.
 void setListLabel(java.lang.String listLabel)
          The label of the list
 void setListOnTop(boolean listOnTop)
          Flag indicating whether the list should be on top of the textfield or vice versa.
 void setListValidator(javax.faces.el.MethodBinding listValidator)
           A validator which will be applied to the contents of the list (e.g.
 void setMaxLength(int maxLength)
          The maximum number of characters allowed for each string in the list.
 void setMultiple(boolean multiple)
          Flag indicating that the application user may make select more than one option from the listbox .
 void setReadOnly(boolean readOnly)
          If this attribute is set to true, the value of the component is rendered as text, preceded by the label if one was defined.
 void setRows(int rows)
          The number of items to display.
 void setSorted(boolean sorted)
          Set this attribute to true if the list items should be sorted.
 void setStyle(java.lang.String style)
          CSS style(s) to be applied when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) to be applied when this component is rendered.
 void setTabIndex(int tabIndex)
          The position of this component in the tabbing order sequence
 void setToolTip(java.lang.String toolTip)
          Display the text as a tooltip for this component
 void setValueBinding(java.lang.String name, javax.faces.el.ValueBinding binding)
          Set the ValueBinding stored for the specified name (if any), respecting any property aliases.
 void setVisible(boolean visible)
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, broadcast, compareValues, decode, getConvertedValue, getSubmittedValue, getValidator, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, setImmediate, setLocalValueSet, setRequired, setSubmittedValue, setValid, setValidator, setValue, setValueChangeListener, updateModel, validate, validateValue
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, getValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, getValue, setConverter
 

Constructor Detail

EditableListBase

public EditableListBase()

Construct a new EditableListBase.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.


getValueBinding

public javax.faces.el.ValueBinding getValueBinding(java.lang.String name)

Return the ValueBinding stored for the specified name (if any), respecting any property aliases.

Parameters:
name - Name of value binding to retrieve

setValueBinding

public void setValueBinding(java.lang.String name,
                            javax.faces.el.ValueBinding binding)

Set the ValueBinding stored for the specified name (if any), respecting any property aliases.

Parameters:
name - Name of value binding to set
binding - ValueBinding to set, or null to remove

isDisabled

public boolean isDisabled()

Flag indicating that the user is not permitted to activate this component, and that the component's value will not be submitted with the form.


setDisabled

public void setDisabled(boolean disabled)

Flag indicating that the user is not permitted to activate this component, and that the component's value will not be submitted with the form.

See Also:
isDisabled()

getFieldLabel

public java.lang.String getFieldLabel()

The label of the text field


setFieldLabel

public void setFieldLabel(java.lang.String fieldLabel)

The label of the text field

See Also:
getFieldLabel()

getFieldValidator

public javax.faces.el.MethodBinding getFieldValidator()

A validator which will be applied to entries made into the textfield. Specify this to be the validate() method of a javax.faces.validator.Validator, or to another method with the same argument structure and exceptions.


setFieldValidator

public void setFieldValidator(javax.faces.el.MethodBinding fieldValidator)

A validator which will be applied to entries made into the textfield. Specify this to be the validate() method of a javax.faces.validator.Validator, or to another method with the same argument structure and exceptions.

See Also:
getFieldValidator()

getLabelLevel

public int getLabelLevel()

Sets the style level for the generated labels. Valid values are 1 (largest), 2 and 3 (smallest). The default value is 2.


setLabelLevel

public void setLabelLevel(int labelLevel)

Sets the style level for the generated labels. Valid values are 1 (largest), 2 and 3 (smallest). The default value is 2.

See Also:
getLabelLevel()

getList

public java.lang.Object getList()

The object that represents the list. It must be a JavaServer Faces EL expression that evaluates to an array of Objects or to a java.util.List.


setList

public void setList(java.lang.Object list)

The object that represents the list. It must be a JavaServer Faces EL expression that evaluates to an array of Objects or to a java.util.List.

See Also:
getList()

getListLabel

public java.lang.String getListLabel()

The label of the list


setListLabel

public void setListLabel(java.lang.String listLabel)

The label of the list

See Also:
getListLabel()

isListOnTop

public boolean isListOnTop()

Flag indicating whether the list should be on top of the textfield or vice versa. By default, the textfield is on top.


setListOnTop

public void setListOnTop(boolean listOnTop)

Flag indicating whether the list should be on top of the textfield or vice versa. By default, the textfield is on top.

See Also:
isListOnTop()

getListValidator

public javax.faces.el.MethodBinding getListValidator()

A validator which will be applied to the contents of the list (e.g. to verify that the list has a minimum number of entries). Specify this to be the validate() method of a javax.faces.validator.Validator, or to another method with the same argument structure and exceptions.


setListValidator

public void setListValidator(javax.faces.el.MethodBinding listValidator)

A validator which will be applied to the contents of the list (e.g. to verify that the list has a minimum number of entries). Specify this to be the validate() method of a javax.faces.validator.Validator, or to another method with the same argument structure and exceptions.

See Also:
getListValidator()

getMaxLength

public int getMaxLength()

The maximum number of characters allowed for each string in the list.


setMaxLength

public void setMaxLength(int maxLength)

The maximum number of characters allowed for each string in the list.

See Also:
getMaxLength()

isMultiple

public boolean isMultiple()

Flag indicating that the application user may make select more than one option from the listbox .


setMultiple

public void setMultiple(boolean multiple)

Flag indicating that the application user may make select more than one option from the listbox .

See Also:
isMultiple()

isReadOnly

public boolean isReadOnly()

If this attribute is set to true, the value of the component is rendered as text, preceded by the label if one was defined.


setReadOnly

public void setReadOnly(boolean readOnly)

If this attribute is set to true, the value of the component is rendered as text, preceded by the label if one was defined.

See Also:
isReadOnly()

getRows

public int getRows()

The number of items to display. The default value is 6.


setRows

public void setRows(int rows)

The number of items to display. The default value is 6.

See Also:
getRows()

isSorted

public boolean isSorted()

Set this attribute to true if the list items should be sorted. The sorting is performed using a Collator configured with the locale from the FacesContext.


setSorted

public void setSorted(boolean sorted)

Set this attribute to true if the list items should be sorted. The sorting is performed using a Collator configured with the locale from the FacesContext.

See Also:
isSorted()

getStyle

public java.lang.String getStyle()

CSS style(s) to be applied when this component is rendered.


setStyle

public void setStyle(java.lang.String style)

CSS style(s) to be applied when this component is rendered.

See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()

CSS style class(es) to be applied when this component is rendered.


setStyleClass

public void setStyleClass(java.lang.String styleClass)

CSS style class(es) to be applied when this component is rendered.

See Also:
getStyleClass()

getTabIndex

public int getTabIndex()

The position of this component in the tabbing order sequence


setTabIndex

public void setTabIndex(int tabIndex)

The position of this component in the tabbing order sequence

See Also:
getTabIndex()

getToolTip

public java.lang.String getToolTip()

Display the text as a tooltip for this component


setToolTip

public void setToolTip(java.lang.String toolTip)

Display the text as a tooltip for this component

See Also:
getToolTip()

isVisible

public boolean isVisible()

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.


setVisible

public void setVisible(boolean visible)

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.

See Also:
isVisible()

restoreState

public void restoreState(javax.faces.context.FacesContext _context,
                         java.lang.Object _state)

Restore the state of this component.


saveState

public java.lang.Object saveState(javax.faces.context.FacesContext _context)

Save the state of this component.