|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase javax.faces.component.UIOutput javax.faces.component.UIInput com.sun.rave.web.ui.component.EditableListBase
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.
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
.
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.<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 |
public EditableListBase()
Construct a new EditableListBase
.
Method Detail |
public java.lang.String getFamily()
Return the family for this component.
public javax.faces.el.ValueBinding getValueBinding(java.lang.String name)
Return the ValueBinding
stored for the
specified name (if any), respecting any property aliases.
name
- Name of value binding to retrievepublic 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.
name
- Name of value binding to setbinding
- ValueBinding to set, or null to removepublic 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.
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.
isDisabled()
public java.lang.String getFieldLabel()
The label of the text field
public void setFieldLabel(java.lang.String fieldLabel)
The label of the text field
getFieldLabel()
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.
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.
getFieldValidator()
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.
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.
getLabelLevel()
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
.
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
.
getList()
public java.lang.String getListLabel()
The label of the list
public void setListLabel(java.lang.String listLabel)
The label of the list
getListLabel()
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.
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.
isListOnTop()
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.
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.
getListValidator()
public int getMaxLength()
The maximum number of characters allowed for each string in the list.
public void setMaxLength(int maxLength)
The maximum number of characters allowed for each string in the list.
getMaxLength()
public boolean isMultiple()
Flag indicating that the application user may make select more than one option from the listbox .
public void setMultiple(boolean multiple)
Flag indicating that the application user may make select more than one option from the listbox .
isMultiple()
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.
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.
isReadOnly()
public int getRows()
The number of items to display. The default value is 6.
public void setRows(int rows)
The number of items to display. The default value is 6.
getRows()
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.
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.
isSorted()
public java.lang.String getStyle()
CSS style(s) to be applied when this component is rendered.
public void setStyle(java.lang.String style)
CSS style(s) to be applied when this component is rendered.
getStyle()
public java.lang.String getStyleClass()
CSS style class(es) to be applied when this component is rendered.
public void setStyleClass(java.lang.String styleClass)
CSS style class(es) to be applied when this component is rendered.
getStyleClass()
public int getTabIndex()
The position of this component in the tabbing order sequence
public void setTabIndex(int tabIndex)
The position of this component in the tabbing order sequence
getTabIndex()
public java.lang.String getToolTip()
Display the text as a tooltip for this component
public void setToolTip(java.lang.String toolTip)
Display the text as a tooltip for this component
getToolTip()
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.
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.
isVisible()
public void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
Restore the state of this component.
public java.lang.Object saveState(javax.faces.context.FacesContext _context)
Save the state of this component.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |