com.sun.webui.jsf.component
Class Listbox

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.Selector
                          extended by com.sun.webui.jsf.component.ListSelector
                              extended by com.sun.webui.jsf.component.Listbox
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 Listbox
extends ListSelector

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
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()
           
 boolean isMonospace()
           
 boolean isMultiple()
          Getter for property multiple.
 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 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, isLabelOnTop, isSeparators, isVisible, mainListSubmits, setLabelOnTop, setRows, setSeparators, setVisible
 
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

Listbox

public Listbox()
Default constructor.

Method Detail

getFamily

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.

Overrides:
getFamily in class ListSelector

getRendererType

public java.lang.String getRendererType()
Overrides:
getRendererType in class javax.faces.component.UIComponentBase

getHtmlTemplate

public java.lang.String getHtmlTemplate()
Get alternative HTML template to be used by this component.


setHtmlTemplate

public void setHtmlTemplate(java.lang.String htmlTemplate)
Set alternative HTML template to be used by this component.


getRows

public int getRows()
Description copied from class: ListSelector

The number of items to display. The default value is 12.

Specified by:
getRows in interface com.sun.webui.jsf.component.ListManager
Overrides:
getRows in class ListSelector

getOnSelect

public java.lang.String getOnSelect()
Description copied from class: Selector

Scripting code executed when some text in this component value is selected.

Overrides:
getOnSelect in class Selector

getValue

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

isMonospace

public boolean isMonospace()

setMonospace

public void setMonospace(boolean monospace)

When set to true, this attribute causes the list items to be rendered in a monospace font.

See Also:
isMonospace()

isMultiple

public boolean isMultiple()
Description copied from class: Selector
Getter for property multiple.

Specified by:
isMultiple in interface com.sun.webui.jsf.component.SelectorManager
Overrides:
isMultiple in class Selector
Returns:
Value of property multiple.

setMultiple

public void setMultiple(boolean multiple)

Flag indicating that the application user can make select more than one option at a time from the listbox.

Overrides:
setMultiple in class Selector
Parameters:
multiple - New value of property multiple.
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.

Deprecated: The attribute is deprecated starting from version 4.1

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

getToolTip

public java.lang.String getToolTip()
Description copied from class: Selector

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
Overrides:
getToolTip in class Selector

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.

Overrides:
setToolTip in class Selector
See Also:
getToolTip()

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 ListSelector

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 ListSelector


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