|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIOutput
javax.faces.component.UIInput
com.sun.webui.jsf.component.WebuiInput
com.sun.webui.jsf.component.Selector
com.sun.webui.jsf.component.ListSelector
com.sun.webui.jsf.component.Listbox
public class Listbox
The Listbox component allows users to select one or more items from a list.
| Field Summary |
|---|
| Fields inherited from class com.sun.webui.jsf.component.ListSelector |
|---|
LABEL_FACET, LIST_ID, VALUE_ID, VALUE_LABEL_ID |
| 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 | |
|---|---|
Listbox()
Default constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
getFamily()
Return the identifier of the component family to which this component belongs. |
java.lang.String |
getHtmlTemplate()
Get alternative HTML template to be used by this component. |
java.lang.String |
getOnSelect()
Scripting code executed when some text in this component value is selected. |
java.lang.String |
getRendererType()
|
int |
getRows()
The number of items to display. |
java.lang.String |
getToolTip()
Sets the value of the title attribute for the HTML element. |
java.lang.Object |
getValue()
|
java.lang.String |
getWidth()
Return a value suitable for the CSS width property to be applied to an HTML select element or null. |
boolean |
isLabelOnTop()
If true, the label is rendered above the component. |
boolean |
isMonospace()
When set to true, this attribute causes the list items to be rendered in a monospace font. |
boolean |
isMultiple()
Flag indicating that the application user can make select more than one option at a time 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. |
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 |
setHtmlTemplate(java.lang.String htmlTemplate)
Set alternative HTML template to be used by this component. |
void |
setLabelOnTop(boolean labelOnTop)
If true, the label is rendered above the component. |
void |
setMonospace(boolean monospace)
When set to true, this attribute causes the list items to be rendered in a monospace font. |
void |
setMultiple(boolean multiple)
Flag indicating that the application user can make select more than one option at a time from the listbox. |
void |
setToolTip(java.lang.String toolTip)
Sets the value of the title attribute for the HTML element. |
| Methods inherited from class com.sun.webui.jsf.component.ListSelector |
|---|
checkSelectionModel, getFocusElementId, getIndicatorComponent, getLabelComponent, getLabeledElementId, getListItems, getListItems, getPrimaryElementID, getReadOnlyValueComponent, getSeparatorLength, getValueAsReadOnly, getValueAsStringArray, isSeparators, isVisible, mainListSubmits, setRows, setSeparators, setVisible, setWidth |
| Methods inherited from class com.sun.webui.jsf.component.Selector |
|---|
getConvertedValue, getItems, getLabel, getLabelLevel, getOnBlur, getOnChange, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getRendersChildren, getSelected, getStyle, getStyleClass, getTabIndex, getValueExpression, isDisabled, setDisabled, setItems, setLabel, setLabelLevel, setOnBlur, setOnChange, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setReadOnly, setSelected, setStyle, setStyleClass, setTabIndex, setValueExpression, toString |
| Methods inherited from class com.sun.webui.jsf.component.WebuiInput |
|---|
broadcast, getValidator, getValidatorExpression, getValueChangeListener, getValueChangeListenerExpression, processDecodes, processUpdates, processValidators, setConverter, setId, setImmediate, setRendered, setRequired, setValidatorExpression, setValueChangeListenerExpression |
| Methods inherited from class javax.faces.component.UIInput |
|---|
addValidator, addValueChangeListener, decode, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidatorMessage, getValidators, getValueChangeListeners, isImmediate, 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 |
|---|
getConverter, getLocalValue |
| Methods inherited from class javax.faces.component.UIComponentBase |
|---|
encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, 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, wait, wait, wait |
| 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, setConverter, setValue |
| Methods inherited from interface com.sun.webui.jsf.component.SelectorManager |
|---|
getClientId, getOnChange, getStyle, getStyleClass, getTabIndex, isDisabled |
| Constructor Detail |
|---|
public Listbox()
| Method Detail |
|---|
public java.lang.String getFamily()
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.
getFamily in class ListSelectorpublic java.lang.String getRendererType()
getRendererType in class javax.faces.component.UIComponentBasepublic java.lang.String getHtmlTemplate()
public void setHtmlTemplate(java.lang.String htmlTemplate)
public java.lang.String getOnSelect()
SelectorScripting code executed when some text in this component value is selected.
getOnSelect in class Selectorpublic java.lang.Object getValue()
getValue in interface javax.faces.component.ValueHoldergetValue in class javax.faces.component.UIOutputpublic boolean isMonospace()
When set to true, this attribute causes the list items to be rendered in a monospace font.
If this property is not set by the application, a themed default
value will be sought, using the key listbox.monospace
from the messages.properties file. If there is no
value for the key, false is returned.
public void setMonospace(boolean monospace)
When set to true, this attribute causes the list items to be rendered in a monospace font.
isMonospace()public boolean isMultiple()
Flag indicating that the application user can make select more than one option at a time from the listbox.
If this property is not set by the application, a themed default
value will be sought, using the key listbox.multiple
from the messages.properties file. If there is no
value for the key, false is returned.
isMultiple in interface com.sun.webui.jsf.component.SelectorManagerisMultiple in class Selectorpublic void setMultiple(boolean multiple)
Flag indicating that the application user can make select more than one option at a time from the listbox.
setMultiple in class Selectormultiple - New value of property multiple.isMultiple()public boolean isLabelOnTop()
If true, the label is rendered above the component. If false, the label is rendered next to the component.
If this property is not set by the application, a themed default
value will be sought, using the key listbox.labelOnTop
from the messages.properties file. If there is no
value for the key, false is returned.
isLabelOnTop in class ListSelectorpublic void setLabelOnTop(boolean labelOnTop)
If true, the label is rendered above the component. If false, the label is rendered next to the component.
setLabelOnTop in class ListSelectorisLabelOnTop()public int getRows()
listbox.size
from the messages.properties file. If there is no
value for the key, or the value is less than or equal to 0,
12 is returned. The String property value is coerced
to int using Integer.parseInt(String).
If this fails 12 is returned.
getRows in interface com.sun.webui.jsf.component.ListManagergetRows in class ListSelectorpublic 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.
Deprecated: The attribute is deprecated starting from version 4.1
isReadOnly in interface com.sun.webui.jsf.component.SelectorManagerisReadOnly in class Selectorpublic java.lang.String getToolTip()
SelectorSets 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.
getToolTip in interface com.sun.webui.jsf.component.ListManagergetToolTip in class Selectorpublic 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.
setToolTip in class SelectorgetToolTip()public java.lang.String getWidth()
If no value has been set, a default value is determined from
the theme property listbox.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.
getWidth in interface com.sun.webui.jsf.component.ListManagergetWidth in class ListSelector
public void restoreState(javax.faces.context.FacesContext _context,
java.lang.Object _state)
Restore the state of this component.
restoreState in interface javax.faces.component.StateHolderrestoreState in class ListSelectorpublic java.lang.Object saveState(javax.faces.context.FacesContext _context)
Save the state of this component.
saveState in interface javax.faces.component.StateHoldersaveState in class ListSelector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||