| com.sun.rave.web.ui.component.EditableListBase
All known Subclasses: com.sun.rave.web.ui.component.EditableList,
EditableListBase | abstract public class EditableListBase extends javax.faces.component.UIInput (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 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
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. The component is rendered
on the same row as the text field and the "Add" button,
after the "Add" 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
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!
|
EditableListBase | public EditableListBase()(Code) | | Construct a new EditableListBase .
|
getFamily | public String getFamily()(Code) | | Return the identifier of the component family to which this
component belongs. This identifier, in conjunction with the value
of the rendererType property, may be used to select
the appropriate
Renderer for this component instance.
|
getFieldLabel | public String getFieldLabel()(Code) | | The label of the text field
|
getFieldValidator | public javax.faces.el.MethodBinding getFieldValidator()(Code) | |
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.
|
getLabelLevel | public int getLabelLevel()(Code) | | Sets the style level for the generated labels. Valid values
are 1 (largest), 2 and 3 (smallest). The default value is 2.
|
getList | public Object getList()(Code) | |
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 .
|
getListLabel | public String getListLabel()(Code) | | The label of the list
|
getListValidator | public javax.faces.el.MethodBinding getListValidator()(Code) | |
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.
|
getMaxLength | public int getMaxLength()(Code) | | The maximum number of characters allowed for each string in the list.
|
getRows | public int getRows()(Code) | | The number of items to display. The default value is 6.
|
getStyle | public String getStyle()(Code) | | CSS style(s) to be applied when this component is rendered.
|
getStyleClass | public String getStyleClass()(Code) | | CSS style class(es) to be applied when this component is rendered.
|
getTabIndex | public int getTabIndex()(Code) | | The position of this component in the tabbing order sequence
|
getToolTip | public String getToolTip()(Code) | | Display the text as a tooltip for this component
|
getValueBinding | public ValueBinding getValueBinding(String name)(Code) | | Return the ValueBinding stored for the
specified name (if any), respecting any property aliases.
Parameters: name - Name of value binding to retrieve |
isDisabled | public boolean isDisabled()(Code) | | 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.
|
isListOnTop | public boolean isListOnTop()(Code) | | Flag indicating whether the list should be on top of the
textfield or vice versa. By default, the textfield is on top.
|
isMultiple | public boolean isMultiple()(Code) | | Flag indicating that the application user may make select
more than one option from the listbox .
|
isReadOnly | public boolean isReadOnly()(Code) | | If this attribute is set to true, the value of the component is
rendered as text, preceded by the label if one was defined.
|
isSorted | public boolean isSorted()(Code) | | 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.
|
isVisible | public boolean isVisible()(Code) | | 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.
|
restoreState | public void restoreState(FacesContext _context, Object _state)(Code) | | Restore the state of this component.
|
saveState | public Object saveState(FacesContext _context)(Code) | | Save the state of this component.
|
setDisabled | public void setDisabled(boolean disabled)(Code) | | 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: EditableListBase.isDisabled() |
setFieldValidator | public void setFieldValidator(javax.faces.el.MethodBinding fieldValidator)(Code) | |
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: EditableListBase.getFieldValidator() |
setLabelLevel | public void setLabelLevel(int labelLevel)(Code) | | Sets the style level for the generated labels. Valid values
are 1 (largest), 2 and 3 (smallest). The default value is 2.
See Also: EditableListBase.getLabelLevel() |
setList | public void setList(Object list)(Code) | |
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: EditableListBase.getList() |
setListOnTop | public void setListOnTop(boolean listOnTop)(Code) | | Flag indicating whether the list should be on top of the
textfield or vice versa. By default, the textfield is on top.
See Also: EditableListBase.isListOnTop() |
setListValidator | public void setListValidator(javax.faces.el.MethodBinding listValidator)(Code) | |
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: EditableListBase.getListValidator() |
setMultiple | public void setMultiple(boolean multiple)(Code) | | Flag indicating that the application user may make select
more than one option from the listbox .
See Also: EditableListBase.isMultiple() |
setReadOnly | public void setReadOnly(boolean readOnly)(Code) | | 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: EditableListBase.isReadOnly() |
setSorted | public void setSorted(boolean sorted)(Code) | | 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: EditableListBase.isSorted() |
setValueBinding | public void setValueBinding(String name, ValueBinding binding)(Code) | | Set the ValueBinding stored for the
specified name (if any), respecting any property
aliases.
Parameters: name - Name of value binding to set Parameters: binding - ValueBinding to set, or null to remove |
setVisible | public void setVisible(boolean visible)(Code) | | 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: EditableListBase.isVisible() |
|
|