|
||||||||||
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.SelectorBase com.sun.rave.web.ui.component.Selector com.sun.rave.web.ui.component.ListSelectorBase com.sun.rave.web.ui.component.ListSelector com.sun.rave.web.ui.component.ListboxBase
This tag renders a listbox. Use the selected
attribute to associate the component with a model object that
represents the current choice, by setting the value to an EL
expression that corresponds to a property of a
managed bean.
Use the multiple
attribute to specify whether the
component accepts multiple selections. By default this is set to
false. If multiple selections are allowed, the model object
property must be either an array of primitives, an array of
objects, or a (subclass of) java.util.List
.
Use the items
attribute to specify the options
from which the web application user can choose. The value must be
an EL expression that identifies an array, a
java.util.Collection
or a java.util.Map
of com.sun.rave.web.ui.Option
.
The first time the component is rendered, the options which
correspond to the value of the selected
model object
property is marked as selected, using the equals
method on the model object.
The number of list items simultaneously shown can be specified
using the rows
attribute, and the component will be
rendered using a monospaced font if the useMonospace
attribute is set to true.
To optionally specify a label for the component, use the
label
attribute, or specify a label facet.
label
: use this facet to specify a custom
component for the label.listbox_setDisabled(<id>, <disabled>)
: use
this function to enable/disable the listbox. <id>
must be the generated id of the component. Set
<disabled>
to true to disable the component,
false to enable it. listbox_changed(<id>)
: this
function is automatically invoked by the listbox's
onchange
handler. <id>
must be the generated id of the component.<ui:listbox selected="#{flightSearch.leaveAirport}" items="#{dataBean.airports}" rows="6" id="leaveAirport" toolTip="#{msgs.chooseAirport}" label="#{msgs.chooseDepartureAirport)" /> <ui:listbox selected="#{flightSearch.leaveAirport}" items="#{dataBean.airports}" rows="6" id="leaveAirport" toolTip="#{msgs.chooseAirport}" label="#{msgs.chooseDepartureAirport)" > <f:facet name="label"> <facet component goes here> </f:facet> </ui:listbox>
Auto-generated component class. Do NOT modify; all changes will be lost!
Field Summary |
Fields inherited from class com.sun.rave.web.ui.component.ListSelector |
LIST_ID, listItems, VALUE_ID |
Fields inherited from class com.sun.rave.web.ui.component.Selector |
valueTypeEvaluator |
Fields inherited from class javax.faces.component.UIInput |
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID |
Constructor Summary | |
ListboxBase()
Construct a new ListboxBase . |
Method Summary | |
java.lang.String |
getFamily()
Return the family for this component. |
boolean |
isMonospace()
A property which indicates whether monospaced fonts should be used. |
boolean |
isMultiple()
Flag indicating that the application user may make select more than one option from the listbox . |
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 |
setMonospace(boolean monospace)
A property which indicates whether monospaced fonts should be used. |
void |
setMultiple(boolean multiple)
Flag indicating that the application user may make select more than one option from the listbox . |
Methods inherited from class com.sun.rave.web.ui.component.ListSelector |
checkSelectionModel, createListItem, getLabelComponent, getListItems, getListItems, getOptions, getPrimaryElementID, getReadOnlyValueComponent, getSeparatorLength, getValueAsReadOnly, getValueAsStringArray, mainListSubmits, markSelectedListItems, processOptions, processSelections |
Methods inherited from class com.sun.rave.web.ui.component.ListSelectorBase |
getRows, isLabelOnTop, isSeparators, isVisible, setLabelOnTop, setRows, setSeparators, setVisible |
Methods inherited from class com.sun.rave.web.ui.component.Selector |
compareValues, getConvertedValue, getLabelLevel, getRendersChildren, getValueAsReadOnly, setSelected, toString |
Methods inherited from class com.sun.rave.web.ui.component.SelectorBase |
getItems, getLabel, getOnBlur, getOnChange, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getSelected, getStyle, getStyleClass, getTabIndex, getToolTip, getValueBinding, isDisabled, isReadOnly, setDisabled, setItems, setLabel, setLabelLevel, setOnBlur, setOnChange, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setReadOnly, setStyle, setStyleClass, setTabIndex, setToolTip, setValueBinding |
Methods inherited from class javax.faces.component.UIInput |
addValidator, addValueChangeListener, broadcast, decode, 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, 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, wait, wait, wait |
Methods inherited from interface com.sun.rave.web.ui.component.ListManager |
getRows, getToolTip, isVisible |
Methods inherited from interface javax.faces.component.EditableValueHolder |
addValidator, addValueChangeListener, getSubmittedValue, getValidator, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, removeValidator, removeValueChangeListener, setImmediate, setLocalValueSet, setRequired, setSubmittedValue, setValid, setValidator, setValueChangeListener |
Methods inherited from interface javax.faces.component.ValueHolder |
getConverter, getLocalValue, getValue, setConverter, setValue |
Methods inherited from interface com.sun.rave.web.ui.component.SelectorManager |
getClientId, getOnChange, getStyle, getStyleClass, getTabIndex, isDisabled, isReadOnly |
Constructor Detail |
public ListboxBase()
Construct a new ListboxBase
.
Method Detail |
public java.lang.String getFamily()
Return the family for this component.
getFamily
in class ListSelectorBase
public boolean isMonospace()
A property which indicates whether monospaced fonts should be used.
public void setMonospace(boolean monospace)
A property which indicates whether monospaced fonts should be used.
isMonospace()
public boolean isMultiple()
Flag indicating that the application user may make select more than one option from the listbox .
isMultiple
in interface SelectorManager
isMultiple
in class Selector
public void setMultiple(boolean multiple)
Flag indicating that the application user may make select more than one option from the listbox .
setMultiple
in class Selector
multiple
- New value of property multiple.isMultiple()
public void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
Restore the state of this component.
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class ListSelectorBase
public java.lang.Object saveState(javax.faces.context.FacesContext _context)
Save the state of this component.
saveState
in interface javax.faces.component.StateHolder
saveState
in class ListSelectorBase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |