com.sun.webui.jsf.component
Class EditableList

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.UIInput
                  extended by com.sun.webui.jsf.component.WebuiInput
                      extended by com.sun.webui.jsf.component.EditableList
All Implemented Interfaces:
com.sun.webui.jsf.component.ComplexComponent, com.sun.webui.jsf.component.ListManager, com.sun.webui.jsf.component.SelectorManager, javax.faces.component.EditableValueHolder, javax.faces.component.NamingContainer, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class EditableList
extends WebuiInput
implements com.sun.webui.jsf.component.ListManager, javax.faces.component.NamingContainer

The EditableList component allows users to create and modify a list of strings.

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

Client-side JavaScript functions


Field Summary
static java.lang.String ADD_BUTTON_FACET
          The add button facet name
static java.lang.String ADD_BUTTON_ID
          The component id for the ADD button
static java.lang.String ADD_BUTTON_TEXT_KEY
          The add button text key.
static java.lang.String ADD_FUNCTION
          Name of the JavaScript function which is responsible for adding elements from the availble list to the selected list
static java.lang.String ENABLE_ADD_FUNCTION
          Name of the JavaScript function which is responsible for enabling/disabling the add button
static java.lang.String ENABLE_REMOVE_FUNCTION
          Name of the JavaScript function which is responsible for enabling/disabling the remove button
static java.lang.String FIELD_FACET
          The input field facet name.
static java.lang.String FIELD_ID
          The component ID for the textfield
static java.lang.String FIELD_LABEL_FACET
          The input field label facet name.
static java.lang.String FIELD_LABEL_ID
          The component ID for the textfield
static java.lang.String FIELD_LABEL_TEXT_KEY
          The default field label text key.
static java.lang.String FOOTER_FACET
          Facet name for the footer facet
static java.lang.String HEADER_FACET
          Facet name for the header facet
static java.lang.String LIST_LABEL_FACET
          The list label facet name.
static java.lang.String LIST_LABEL_ID
          The component ID for the textfield
static java.lang.String LIST_LABEL_TEXT_KEY
          The list default label text key.
static java.lang.String READ_ONLY_FACET
          The read only facet name.
static java.lang.String READ_ONLY_ID
          The component ID for the textfield
static java.lang.String REMOVE_BUTTON_FACET
          The remove button facet name
static java.lang.String REMOVE_BUTTON_ID
          The component ID for the remove button
static java.lang.String REMOVE_BUTTON_TEXT_KEY
          The remove button text key.
static java.lang.String SEARCH_FACET
          Facet name for the search facet
static java.lang.String SET_ADD_DISABLED_FUNCTION
          Name of the JavaScript function which is responsible for enabling/disabling the add button
static java.lang.String SLV_TOOLONG_KEY
          The text key for the StringLengthValidator "too long" message.
static java.lang.String SLV_TOOSHORT_KEY
          The text key for the StringLengthValidator "too short" message.
static java.lang.String SPACER_STRING
           
static java.lang.String UPDATE_BUTTONS_FUNCTION
          Name of the JavaScript function that updates the buttons
 
Fields inherited from class javax.faces.component.UIInput
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
EditableList()
          Default constructor.
 
Method Summary
 javax.faces.component.UIComponent getAddButtonComponent()
          Return a component that implements the add button.
 java.lang.Object getConvertedValue(javax.faces.context.FacesContext context, java.lang.Object submittedValue)
          Retrieve the value of this component (the "selected" property) as an object.
 javax.faces.convert.Converter getConverter()
           
 java.lang.String getFamily()
          Return the family for this component.
 javax.faces.component.UIComponent getFieldComponent()
          Return a component that implements an input field facet.
 java.lang.String getFieldLabel()
          Text to be used as the label next to the input text field.
 javax.faces.component.UIComponent getFieldLabelComponent()
          Return a component that implements a label for the input field.
 javax.el.MethodExpression getFieldValidatorExpression()
           A validator that will be applied to entries made into the textfield.
 java.lang.String getFocusElementId(javax.faces.context.FacesContext context)
          Returns the id of an HTML element suitable to receive the focus.
 javax.faces.component.UIComponent getIndicatorComponent(javax.faces.context.FacesContext context, Label label)
          Return a component instance that can be referenced by a Label in order to evaluate the required and valid states of this component.
 java.lang.String getJavaScriptObjectName()
           
 java.lang.String getLabeledElementId(javax.faces.context.FacesContext context)
          Returns the absolute ID of an HTML element suitable for use as the value of an HTML LABEL element's for attribute.
 int getLabelLevel()
          Sets the style level for the generated labels.
 java.lang.Object getList()
           The object that represents the list.
 java.util.Iterator getListItems(javax.faces.context.FacesContext context, boolean rulerAtEnd)
          Retrieve an Iterator of ListSelector.ListItem, to be used by the renderer.
 java.lang.String getListLabel()
          Text to be used as the label next to the list box.
 javax.faces.component.UIComponent getListLabelComponent()
          Return a component that implements a label for the list.
 javax.el.MethodExpression getListValidatorExpression()
           A validator which will be applied to the contents of the list (e.g.
 int getMaxLength()
          Get the maximum length of the strings on the list.
 java.lang.String getOnChange()
           
 java.lang.String getPrimaryElementID(javax.faces.context.FacesContext context)
          Deprecated.  
 javax.faces.component.UIComponent getReadOnlyValueComponent()
          Return a component that implements the read only value of this EditableList.
 javax.faces.component.UIComponent getRemoveButtonComponent()
          Return a component that implements the remove button.
 int getRows()
          The number of items to display, which determines the length of the rendered listbox.
 java.lang.String getStyle()
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 java.lang.String getStyleClass()
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 int getTabIndex()
          Position of this element in the tabbing order of the current document.
 java.lang.String getToolTip()
          Sets the value of the title attribute for the HTML element.
 javax.el.MethodExpression getValidatorExpression()
          Get the validatorExpression.
 java.lang.Object getValue()
           
 java.lang.String[] getValueAsStringArray(javax.faces.context.FacesContext context)
           
 javax.el.ValueExpression getValueExpression(java.lang.String name)
          Return the ValueExpression stored for the specified name (if any), respecting any property aliases.
 java.lang.String[] getValuesToRemove()
          Getter for property valuesToRemove.
 java.lang.String getWidth()
          Return a value suitable for the CSS width property to be applied to an HTML select element or null.
 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 isImmediate()
           
 boolean isListOnTop()
          Specifies the display order of the parts of this component.
 boolean isMultiple()
          Flag indicating that the application user can select more than one option at a time in 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 sorted to true if the list items should be sorted in locale-specific alphabetical order.
 boolean isVisible()
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 boolean mainListSubmits()
           
 void processAddAction()
           
 void processRemoveAction()
           
 void processValidators(javax.faces.context.FacesContext context)
          Specialized validation behavior on top of that provided by the superclass.
 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 setConverter(javax.faces.convert.Converter converter)
          Specifies a method to translate native property values to String and back for 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)
          Text to be used as the label next to the input text field.
 void setFieldValidatorExpression(javax.el.MethodExpression me)
           A validator that 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)
          Text to be used as the label next to the list box.
 void setListOnTop(boolean listOnTop)
          Specifies the display order of the parts of this component.
 void setListValidatorExpression(javax.el.MethodExpression 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 can select more than one option at a time in 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)
           
 void setSorted(boolean sorted)
          Set this attribute to true if the list items should be sorted in locale-specific alphabetical order.
 void setStyle(java.lang.String style)
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 void setTabIndex(int tabIndex)
          Position of this element in the tabbing order of the current document.
 void setToolTip(java.lang.String toolTip)
          Sets the value of the title attribute for the HTML element.
 void setValueExpression(java.lang.String name, javax.el.ValueExpression binding)
          Set the ValueExpression stored for the specified name (if any), respecting any property aliases.
 void setValuesToRemove(java.lang.String[] valuesToRemove)
          Setter for property valuesToRemove.
 void setVisible(boolean visible)
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 void setWidth(java.lang.String width)
          width is a value for the CSS width property suitable for the select HTML element.
 
Methods inherited from class com.sun.webui.jsf.component.WebuiInput
broadcast, getValidator, getValueChangeListener, getValueChangeListenerExpression, processDecodes, processUpdates, setId, setImmediate, setRendered, setRequired, setValidatorExpression, setValueChangeListenerExpression
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, decode, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidatorMessage, getValidators, getValueChangeListeners, isLocalValueSet, isRequired, isValid, removeValidator, removeValueChangeListener, resetValue, setConverterMessage, setLocalValueSet, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validate
 
Methods inherited from class javax.faces.component.UIOutput
getLocalValue
 
Methods inherited from class javax.faces.component.UIComponentBase
encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.EditableValueHolder
addValidator, addValueChangeListener, getSubmittedValue, getValidator, getValidators, getValueChangeListener, getValueChangeListeners, isLocalValueSet, isRequired, isValid, removeValidator, removeValueChangeListener, setImmediate, setLocalValueSet, setRequired, setSubmittedValue, setValid, setValidator, setValueChangeListener
 
Methods inherited from interface javax.faces.component.ValueHolder
getLocalValue, setValue
 
Methods inherited from interface com.sun.webui.jsf.component.SelectorManager
getClientId
 

Field Detail

ADD_BUTTON_ID

public static final java.lang.String ADD_BUTTON_ID
The component id for the ADD button

See Also:
Constant Field Values

ADD_BUTTON_FACET

public static final java.lang.String ADD_BUTTON_FACET
The add button facet name

See Also:
Constant Field Values

ADD_BUTTON_TEXT_KEY

public static final java.lang.String ADD_BUTTON_TEXT_KEY
The add button text key.

See Also:
Constant Field Values

REMOVE_BUTTON_ID

public static final java.lang.String REMOVE_BUTTON_ID
The component ID for the remove button

See Also:
Constant Field Values

REMOVE_BUTTON_FACET

public static final java.lang.String REMOVE_BUTTON_FACET
The remove button facet name

See Also:
Constant Field Values

REMOVE_BUTTON_TEXT_KEY

public static final java.lang.String REMOVE_BUTTON_TEXT_KEY
The remove button text key.

See Also:
Constant Field Values

FIELD_ID

public static final java.lang.String FIELD_ID
The component ID for the textfield

See Also:
Constant Field Values

FIELD_FACET

public static final java.lang.String FIELD_FACET
The input field facet name.

See Also:
Constant Field Values

SLV_TOOLONG_KEY

public static final java.lang.String SLV_TOOLONG_KEY
The text key for the StringLengthValidator "too long" message.

See Also:
Constant Field Values

SLV_TOOSHORT_KEY

public static final java.lang.String SLV_TOOSHORT_KEY
The text key for the StringLengthValidator "too short" message.

See Also:
Constant Field Values

LIST_LABEL_ID

public static final java.lang.String LIST_LABEL_ID
The component ID for the textfield

See Also:
Constant Field Values

LIST_LABEL_FACET

public static final java.lang.String LIST_LABEL_FACET
The list label facet name.

See Also:
Constant Field Values

LIST_LABEL_TEXT_KEY

public static final java.lang.String LIST_LABEL_TEXT_KEY
The list default label text key.

See Also:
Constant Field Values

FIELD_LABEL_ID

public static final java.lang.String FIELD_LABEL_ID
The component ID for the textfield

See Also:
Constant Field Values

FIELD_LABEL_FACET

public static final java.lang.String FIELD_LABEL_FACET
The input field label facet name.

See Also:
Constant Field Values

FIELD_LABEL_TEXT_KEY

public static final java.lang.String FIELD_LABEL_TEXT_KEY
The default field label text key.

See Also:
Constant Field Values

READ_ONLY_ID

public static final java.lang.String READ_ONLY_ID
The component ID for the textfield

See Also:
Constant Field Values

READ_ONLY_FACET

public static final java.lang.String READ_ONLY_FACET
The read only facet name.

See Also:
Constant Field Values

HEADER_FACET

public static final java.lang.String HEADER_FACET
Facet name for the header facet

See Also:
Constant Field Values

FOOTER_FACET

public static final java.lang.String FOOTER_FACET
Facet name for the footer facet

See Also:
Constant Field Values

ADD_FUNCTION

public static final java.lang.String ADD_FUNCTION
Name of the JavaScript function which is responsible for adding elements from the availble list to the selected list

See Also:
Constant Field Values

ENABLE_ADD_FUNCTION

public static final java.lang.String ENABLE_ADD_FUNCTION
Name of the JavaScript function which is responsible for enabling/disabling the add button

See Also:
Constant Field Values

SET_ADD_DISABLED_FUNCTION

public static final java.lang.String SET_ADD_DISABLED_FUNCTION
Name of the JavaScript function which is responsible for enabling/disabling the add button

See Also:
Constant Field Values

ENABLE_REMOVE_FUNCTION

public static final java.lang.String ENABLE_REMOVE_FUNCTION
Name of the JavaScript function which is responsible for enabling/disabling the remove button

See Also:
Constant Field Values

UPDATE_BUTTONS_FUNCTION

public static final java.lang.String UPDATE_BUTTONS_FUNCTION
Name of the JavaScript function that updates the buttons

See Also:
Constant Field Values

SEARCH_FACET

public static final java.lang.String SEARCH_FACET
Facet name for the search facet

See Also:
Constant Field Values

SPACER_STRING

public static final java.lang.String SPACER_STRING
See Also:
Constant Field Values
Constructor Detail

EditableList

public EditableList()
Default constructor.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.

Overrides:
getFamily in class javax.faces.component.UIInput

getMaxLength

public int getMaxLength()
Get the maximum length of the strings on the list. If the length is less than 1, the default value of 15 is returned.

Returns:
An integer value for the maximum number of characters on the list

getAddButtonComponent

public javax.faces.component.UIComponent getAddButtonComponent()
Return a component that implements the add button. If a facet named addButton is found that component is returned. Otherwise a Button component is returned. It is assigned the id
getId() + "_addButton"

If the facet is not defined then the returned Button component is re-intialized every time this method is called.

Returns:
an add button component

getRemoveButtonComponent

public javax.faces.component.UIComponent getRemoveButtonComponent()
Return a component that implements the remove button. If a facet named removeButton is found that component is returned. Otherwise a Button component is returned. It is assigned the id
getId() + "_removeButton"

If the facet is not defined then the returned Button component is re-intialized every time this method is called.

Returns:
a remove button component

getListLabelComponent

public javax.faces.component.UIComponent getListLabelComponent()
Return a component that implements a label for the list. If a facet named listLabel is found that component is returned. Otherwise a Label component is returned. It is assigned the id
getId() + "_listLabel"

If the facet is not defined then the returned Label component is re-intialized every time this method is called.

Returns:
a list label component

getFieldLabelComponent

public javax.faces.component.UIComponent getFieldLabelComponent()
Return a component that implements a label for the input field. If a facet named fieldLabel is found that component is returned. Otherwise a Label component is returned. It is assigned the id
getId() + "_fieldLabel"

If the facet is not defined then the returned Label component is re-intialized every time this method is called.

Returns:
a field label component

getFieldComponent

public javax.faces.component.UIComponent getFieldComponent()
Return a component that implements an input field facet. If a facet named field is found that component is returned. Otherwise a TextField component is returned. It is assigned the id
getId() + "_field"

If the facet is not defined then the returned TextField component is re-intialized every time this method is called.

Returns:
an input field facet component

getReadOnlyValueComponent

public javax.faces.component.UIComponent getReadOnlyValueComponent()
Return a component that implements the read only value of this EditableList. If a facet named readOnly is found that component is returned. Otherwise a StaticText component is returned. It is assigned the id
getId() + "_readOnly"

If the facet is not defined then the returned StaticText component is re-intialized every time this method is called.

Specified by:
getReadOnlyValueComponent in interface com.sun.webui.jsf.component.ListManager
Returns:
a component that represents the read only value of this EditableList

setConverter

public void setConverter(javax.faces.convert.Converter converter)
Description copied from class: WebuiInput
Specifies a method to translate native property values to String and back for this component. The converter attribute value must be one of the following:

Specified by:
setConverter in interface javax.faces.component.ValueHolder
Overrides:
setConverter in class WebuiInput
Parameters:
converter -

getJavaScriptObjectName

public java.lang.String getJavaScriptObjectName()

getOnChange

public java.lang.String getOnChange()
Specified by:
getOnChange in interface com.sun.webui.jsf.component.SelectorManager

getLabeledElementId

public java.lang.String getLabeledElementId(javax.faces.context.FacesContext context)
Returns the absolute ID of an HTML element suitable for use as the value of an HTML LABEL element's for attribute. If the ComplexComponent has sub-compoents, and one of the sub-components is the target of a label, if that sub-component is a ComplexComponent, then getLabeledElementId must called on the sub-component and the value returned. The value returned by this method call may or may not resolve to a component instance.

If isReadOnly returns true, then the getReadOnlyValueComponent method is called. If the component instance returned is a ComplexComponent then getLabeledElementId is called on it and the value returned, else its client id is returned.

Specified by:
getLabeledElementId in interface com.sun.webui.jsf.component.ComplexComponent
Parameters:
context - The FacesContext used for the request
Returns:
An abolute id suitable for the value of an HTML LABEL element's for attribute.

getFocusElementId

public java.lang.String getFocusElementId(javax.faces.context.FacesContext context)
Returns the id of an HTML element suitable to receive the focus. If the ComplexComponent has sub-compoents, and one of the sub-components is to reveive the focus, if that sub-component is a ComplexComponent, then getFocusElementId must called on the sub-component and the value returned. The value returned by this method call may or may not resolve to a component instance.

This implementations returns the value of getLabeledElementId.

Specified by:
getFocusElementId in interface com.sun.webui.jsf.component.ComplexComponent
Parameters:
context - The FacesContext used for the request

getIndicatorComponent

public javax.faces.component.UIComponent getIndicatorComponent(javax.faces.context.FacesContext context,
                                                               Label label)
Return a component instance that can be referenced by a Label in order to evaluate the required and valid states of this component.

Specified by:
getIndicatorComponent in interface com.sun.webui.jsf.component.ComplexComponent
Parameters:
context - The current FacesContext instance
label - The Label that labels this component.
Returns:
a UIComponent in order to evaluate the required and valid states.

getPrimaryElementID

public java.lang.String getPrimaryElementID(javax.faces.context.FacesContext context)
Deprecated. 

Implement this method so that it returns the DOM ID of the HTML element which should receive focus when the component receives focus, and to which a component label should apply. Usually, this is the first element that accepts input.

Specified by:
getPrimaryElementID in interface com.sun.webui.jsf.component.ComplexComponent
Parameters:
context - The FacesContext for the request
Returns:
The client id, also the JavaScript element id
See Also:
getLabeledElementId(javax.faces.context.FacesContext), getFocusElementId(javax.faces.context.FacesContext)

getValuesToRemove

public java.lang.String[] getValuesToRemove()
Getter for property valuesToRemove.

Returns:
Value of property valuesToRemove.

setValuesToRemove

public void setValuesToRemove(java.lang.String[] valuesToRemove)
Setter for property valuesToRemove.

Parameters:
valuesToRemove - New value of property valuesToRemove.

getListItems

public java.util.Iterator getListItems(javax.faces.context.FacesContext context,
                                       boolean rulerAtEnd)
                                throws javax.faces.FacesException
Retrieve an Iterator of ListSelector.ListItem, to be used by the renderer.

Specified by:
getListItems in interface com.sun.webui.jsf.component.ListManager
Returns:
an Iterator over ListItem.
Throws:
javax.faces.FacesException

getConvertedValue

public java.lang.Object getConvertedValue(javax.faces.context.FacesContext context,
                                          java.lang.Object submittedValue)
                                   throws javax.faces.convert.ConverterException
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.

Overrides:
getConvertedValue in class javax.faces.component.UIInput
Parameters:
context - The FacesContext of the request
submittedValue - The submitted value of the component
Throws:
javax.faces.convert.ConverterException

processValidators

public void processValidators(javax.faces.context.FacesContext context)
Description copied from class: WebuiInput

Specialized validation behavior on top of that provided by the superclass.

Overrides:
processValidators in class WebuiInput
Parameters:
context - FacesContext for this request.
Throws:
java.lang.NullPointerException

processAddAction

public void processAddAction()

processRemoveAction

public void processRemoveAction()

getValueAsStringArray

public java.lang.String[] getValueAsStringArray(javax.faces.context.FacesContext context)
Specified by:
getValueAsStringArray in interface com.sun.webui.jsf.component.ListManager

mainListSubmits

public boolean mainListSubmits()
Specified by:
mainListSubmits in interface com.sun.webui.jsf.component.ListManager

getValueExpression

public javax.el.ValueExpression getValueExpression(java.lang.String name)

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

Overrides:
getValueExpression in class javax.faces.component.UIComponentBase
Parameters:
name - Name of value binding expression to retrieve

setValueExpression

public void setValueExpression(java.lang.String name,
                               javax.el.ValueExpression binding)

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

Overrides:
setValueExpression in class javax.faces.component.UIComponentBase
Parameters:
name - Name of value binding to set
binding - ValueExpression to set, or null to remove

getConverter

public javax.faces.convert.Converter getConverter()
Specified by:
getConverter in interface javax.faces.component.ValueHolder
Overrides:
getConverter in class javax.faces.component.UIOutput

isImmediate

public boolean isImmediate()
Specified by:
isImmediate in interface javax.faces.component.EditableValueHolder
Overrides:
isImmediate in class javax.faces.component.UIInput

getValue

public java.lang.Object getValue()
Specified by:
getValue in interface javax.faces.component.ValueHolder
Overrides:
getValue in class javax.faces.component.UIOutput

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.

Specified by:
isDisabled in interface com.sun.webui.jsf.component.SelectorManager

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()

Text to be used as the label next to the input text field.


setFieldLabel

public void setFieldLabel(java.lang.String fieldLabel)

Text to be used as the label next to the input text field.

See Also:
getFieldLabel()

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. The list attribute must be an EL expression that evaluates to an object of typejava.lang.String[].


setList

public void setList(java.lang.Object list)

The object that represents the list. The list attribute must be an EL expression that evaluates to an object of typejava.lang.String[].

See Also:
getList()

getListLabel

public java.lang.String getListLabel()

Text to be used as the label next to the list box.


setListLabel

public void setListLabel(java.lang.String listLabel)

Text to be used as the label next to the list box.

See Also:
getListLabel()

isListOnTop

public boolean isListOnTop()

Specifies the display order of the parts of this component. When set to true, the listOnTop attribute causes the list box to be displayed above the text input field. By default, the list box is displayed below the input field.


setListOnTop

public void setListOnTop(boolean listOnTop)

Specifies the display order of the parts of this component. When set to true, the listOnTop attribute causes the list box to be displayed above the text input field. By default, the list box is displayed below the input field.

See Also:
isListOnTop()

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 can select more than one option at a time in the listbox.

Specified by:
isMultiple in interface com.sun.webui.jsf.component.SelectorManager

setMultiple

public void setMultiple(boolean multiple)

Flag indicating that the application user can select more than one option at a time in 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.

Specified by:
isReadOnly in interface com.sun.webui.jsf.component.SelectorManager

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, which determines the length of the rendered listbox. The default value is 6.

Specified by:
getRows in interface com.sun.webui.jsf.component.ListManager
Returns:
The number options to display.

setRows

public void setRows(int rows)

isSorted

public boolean isSorted()

Set sorted to true if the list items should be sorted in locale-specific alphabetical order. 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 in locale-specific alphabetical order. 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 to the outermost HTML element when this component is rendered.

Specified by:
getStyle in interface com.sun.webui.jsf.component.SelectorManager

setStyle

public void setStyle(java.lang.String style)

CSS style(s) to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.

Specified by:
getStyleClass in interface com.sun.webui.jsf.component.SelectorManager

setStyleClass

public void setStyleClass(java.lang.String styleClass)

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyleClass()

getTabIndex

public int getTabIndex()

Position of this element in the tabbing order of the current document. Tabbing order determines the sequence in which elements receive focus when the tab key is pressed. The value must be an integer between 0 and 32767.

Specified by:
getTabIndex in interface com.sun.webui.jsf.component.SelectorManager

setTabIndex

public void setTabIndex(int tabIndex)

Position of this element in the tabbing order of the current document. Tabbing order determines the sequence in which elements receive focus when the tab key is pressed. The value must be an integer between 0 and 32767.

See Also:
getTabIndex()

getToolTip

public java.lang.String getToolTip()

Sets the value of the title attribute for the HTML element. The specified text will display as a tooltip if the mouse cursor hovers over the HTML element.

Specified by:
getToolTip in interface com.sun.webui.jsf.component.ListManager

setToolTip

public void setToolTip(java.lang.String toolTip)

Sets the value of the title attribute for the HTML element. The specified text will display as a tooltip if the mouse cursor hovers over the HTML element.

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.

Specified by:
isVisible in interface com.sun.webui.jsf.component.ListManager

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()

getWidth

public java.lang.String getWidth()
Return a value suitable for the CSS width property to be applied to an HTML select element or null.

If no value has been set, a default value is determined from the theme property editableList.width defined in the messages theme category. If this theme property is not defined, the width is determined by the longest option element of the rendered select element.

Specified by:
getWidth in interface com.sun.webui.jsf.component.ListManager
Returns:
The value used to determine the width of a select HTML element.

setWidth

public void setWidth(java.lang.String width)
width is a value for the CSS width property suitable for the select HTML element. As a CSS string property value, width is assumed to contain the units. For example:

The value is not parsed by EditableList and is intended to be applied directly to the style attribute of the select element. If width is null, EditableList behavior will assume the size of the select element will be based on the length of the longest option in the select element.

See Also:
getWidth()

getFieldValidatorExpression

public javax.el.MethodExpression getFieldValidatorExpression()

A validator that 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.


setFieldValidatorExpression

public void setFieldValidatorExpression(javax.el.MethodExpression me)

A validator that 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:
getFieldValidatorExpression()

getListValidatorExpression

public javax.el.MethodExpression getListValidatorExpression()

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.


setListValidatorExpression

public void setListValidatorExpression(javax.el.MethodExpression 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:
getListValidatorExpression()

getValidatorExpression

public javax.el.MethodExpression getValidatorExpression()
Description copied from class: WebuiInput

Get the validatorExpression. The corresponding validator will be called from the validateValue method.

Overrides:
getValidatorExpression in class WebuiInput

restoreState

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

Restore the state of this component.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class WebuiInput

saveState

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

Save the state of this component.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class WebuiInput


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.