com.sun.rave.web.ui.component
Class DropDown

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byjavax.faces.component.UIComponentBase
          extended byjavax.faces.component.UIOutput
              extended byjavax.faces.component.UIInput
                  extended bycom.sun.rave.web.ui.component.SelectorBase
                      extended bycom.sun.rave.web.ui.component.Selector
                          extended bycom.sun.rave.web.ui.component.ListSelectorBase
                              extended bycom.sun.rave.web.ui.component.ListSelector
                                  extended bycom.sun.rave.web.ui.component.DropDownBase
                                      extended bycom.sun.rave.web.ui.component.DropDown
All Implemented Interfaces:
javax.faces.component.ActionSource, ComplexComponent, javax.faces.component.EditableValueHolder, ListManager, SelectorManager, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class DropDown
extends DropDownBase
implements javax.faces.component.ActionSource

Component that represents a drop down menu.


Field Summary
static java.lang.String SUBMIT
           
 
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
DropDown()
           
 
Method Summary
 void addActionListener(javax.faces.event.ActionListener listener)
          Add a new ActionListener to the set of listeners interested in being notified when ActionEvents occur.
 void broadcast(javax.faces.event.FacesEvent event)
          In addition to to the default UIComponent.broadcast(javax.faces.event.FacesEvent) processing, pass the ActionEvent being broadcast to the method referenced by actionListener (if any), and to the default ActionListener registered on the Application.
 javax.faces.el.MethodBinding getAction()
          Method binding representing a method that processes application actions from this component.
 javax.faces.event.ActionListener[] getActionListeners()
          Return the set of registered ActionListeners for this ActionSource instance.
 boolean getMultiple()
          Getter for property multiple
 int getRows()
          Getter for property Rows.
 void processDecodes(javax.faces.context.FacesContext context)
          The DropDown needs to override the standard decoding behaviour since it may also be an action source.
 void queueEvent(javax.faces.event.FacesEvent e)
          Intercept queueEvent and, for ActionEvents, mark the phaseId for the event to be PhaseId.APPLY_REQUEST_VALUES if the immediate flag is true, PhaseId.INVOKE_APPLICATION otherwise.
 void removeActionListener(javax.faces.event.ActionListener listener)
          Remove an existing ActionListener (if any) from the set of listeners interested in being notified when ActionEvents occur.
 void setMultiple(boolean multiple)
          Setter for property multiple
 void setRows(int DisplayRows)
          Setter for property Rows.
 void validate(javax.faces.context.FacesContext context)
           
 
Methods inherited from class com.sun.rave.web.ui.component.DropDownBase
getActionListener, getFamily, isForgetValue, isNavigateToValue, isSubmitForm, restoreState, saveState, setAction, setActionListener, setForgetValue, setNavigateToValue, setSubmitForm
 
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
isLabelOnTop, isSeparators, isVisible, setLabelOnTop, setSeparators, setVisible
 
Methods inherited from class com.sun.rave.web.ui.component.Selector
compareValues, getConvertedValue, getLabelLevel, getRendersChildren, getValueAsReadOnly, isMultiple, 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, decode, getSubmittedValue, getValidator, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processUpdates, processValidators, removeValidator, removeValueChangeListener, setImmediate, setLocalValueSet, setRequired, setSubmittedValue, setValid, setValidator, setValue, setValueChangeListener, updateModel, 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, 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 javax.faces.component.ActionSource
getActionListener, isImmediate, setAction, setActionListener, setImmediate
 
Methods inherited from interface com.sun.rave.web.ui.component.ListManager
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, isMultiple, isReadOnly
 

Field Detail

SUBMIT

public static final java.lang.String SUBMIT
See Also:
Constant Field Values
Constructor Detail

DropDown

public DropDown()
Method Detail

getAction

public javax.faces.el.MethodBinding getAction()
Description copied from class: DropDownBase

Method binding representing a method that processes application actions from this component. This attribute is only referenced when submitForm is true.

Specified by:
getAction in interface javax.faces.component.ActionSource
Overrides:
getAction in class DropDownBase

getRows

public int getRows()
Getter for property Rows.

Specified by:
getRows in interface ListManager
Overrides:
getRows in class ListSelectorBase
Returns:
Value of property Rows.

setRows

public void setRows(int DisplayRows)
Setter for property Rows.

Overrides:
setRows in class ListSelectorBase
Parameters:
DisplayRows - New value of property DisplayRows.
See Also:
ListSelectorBase.getRows()

getMultiple

public boolean getMultiple()
Getter for property multiple

Returns:
Value of property multiple

setMultiple

public void setMultiple(boolean multiple)
Setter for property multiple

Overrides:
setMultiple in class Selector
Parameters:
multiple - New value of property multiple

addActionListener

public void addActionListener(javax.faces.event.ActionListener listener)

Add a new ActionListener to the set of listeners interested in being notified when ActionEvents occur.

Specified by:
addActionListener in interface javax.faces.component.ActionSource
Parameters:
listener - The ActionListener to be added
Throws:
java.lang.NullPointerException - if listener is null

getActionListeners

public javax.faces.event.ActionListener[] getActionListeners()

Return the set of registered ActionListeners for this ActionSource instance. If there are no registered listeners, a zero-length array is returned.

Specified by:
getActionListeners in interface javax.faces.component.ActionSource

removeActionListener

public void removeActionListener(javax.faces.event.ActionListener listener)

Remove an existing ActionListener (if any) from the set of listeners interested in being notified when ActionEvents occur.

Specified by:
removeActionListener in interface javax.faces.component.ActionSource
Parameters:
listener - The ActionListener to be removed
Throws:
java.lang.NullPointerException - if listener is null

processDecodes

public void processDecodes(javax.faces.context.FacesContext context)

The DropDown needs to override the standard decoding behaviour since it may also be an action source. We decode the component w.r.t. the value first, and validate it if the component is immediate. Then we fire an action event.

Throws:
java.lang.NullPointerException

broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException

In addition to to the default UIComponent.broadcast(javax.faces.event.FacesEvent) processing, pass the ActionEvent being broadcast to the method referenced by actionListener (if any), and to the default ActionListener registered on the Application.

Parameters:
event - FacesEvent to be broadcast
Throws:
javax.faces.event.AbortProcessingException - Signal the JavaServer Faces implementation that no further processing on the current event should be performed @exception IllegalArgumentException if the implementation class of this FacesEvent is not supported by this component
java.lang.NullPointerException - if event is null

queueEvent

public void queueEvent(javax.faces.event.FacesEvent e)

Intercept queueEvent and, for ActionEvents, mark the phaseId for the event to be PhaseId.APPLY_REQUEST_VALUES if the immediate flag is true, PhaseId.INVOKE_APPLICATION otherwise.


validate

public void validate(javax.faces.context.FacesContext context)