|
||||||||||
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.AddRemoveBase com.sun.rave.web.ui.component.AddRemove
Use the AddRemove component when the web application user makes selections from a list and they need to see the currently selected items displayed together, and/or they need to reorder the selected items.
Field Summary | |
static java.lang.String |
ADD_BUTTON_FACET
The facet name of the add button |
static java.lang.String |
ADD_BUTTON_ID
The component id for the ADD button |
static java.lang.String |
ADD_FUNCTION
Name of the JavaScript function which is responsible for adding elements from the availble list to the selected list |
static java.lang.String |
ADDALL_BUTTON_FACET
The facet name of the Add All button |
static java.lang.String |
ADDALL_BUTTON_ID
The component id for the ADD ALL button |
static java.lang.String |
ADDALL_FUNCTION
Name of the JavaScript function which is responsible for selecting all the available items |
static java.lang.String |
AVAILABLE_ID
The id of the label component that functions as the label above the available list |
static java.lang.String |
AVAILABLE_LABEL_FACET
The facet name of the label over the "Available" list |
static java.lang.String |
AVAILABLE_LABEL_ID
The component ID for the items list |
static java.lang.String |
AVAILABLE_ONCHANGE_FUNCTION
Name of the JavaScript function that handles changes on the available list |
static java.lang.String |
FOOTER_FACET
Facet name for the footer facet |
static java.lang.String |
HEADER_FACET
Facet name for the header facet |
static java.lang.String |
HEADER_ID
The facet name of the header (component label) |
static java.lang.String |
JAVASCRIPT_PREFIX
Represents the "javascript:" printed at the start of javascript event handler code |
static java.lang.String |
JSOBJECT
The name of the component attribute that stores the name of the JavaScript object that organizes the JavsSCript functions for the component |
static java.lang.String |
MOVEDOWN_BUTTON_FACET
The facet name of the "Move Down" button |
static java.lang.String |
MOVEDOWN_BUTTON_ID
The component ID for the move down button |
static java.lang.String |
MOVEDOWN_FUNCTION
Name of the JavaScript function which moves elements down |
static java.lang.String |
MOVEUP_BUTTON_FACET
The facet name of the "Move Up" button |
static java.lang.String |
MOVEUP_BUTTON_ID
The component ID for the move up button |
static java.lang.String |
MOVEUP_FUNCTION
Name of the JavaScript function which moves elements up |
static java.lang.String |
MULTIPLEADDITIONS_FUNCTION
The name of the JavaScript function used to hook up the correct add and remove functions when the component allows items to be added to the selected items list more than once |
static java.lang.String |
REMOVE_BUTTON_FACET
The facet name of the remove button |
static java.lang.String |
REMOVE_BUTTON_ID
The component ID for the remove button |
static java.lang.String |
REMOVE_FUNCTION
Name of the JavaScript function which removes items from the seleted list |
static java.lang.String |
REMOVEALL_BUTTON_FACET
The facet name of the "Remove All" button |
static java.lang.String |
REMOVEALL_BUTTON_ID
The component ID for the remove all button |
static java.lang.String |
REMOVEALL_FUNCTION
Name of the JavaScript function which removes all the items from the seleted list |
static java.lang.String |
RETURN
String representing "return false" printed at the end of the javascript event handlers |
static java.lang.String |
SELECTED_ID
The ID of the component that functions as the label above the "Selected" list |
static java.lang.String |
SELECTED_LABEL_FACET
The facet name of the label over the "Selected" list |
static java.lang.String |
SELECTED_LABEL_ID
The component ID for the selected list |
static java.lang.String |
SELECTED_ONCHANGE_FUNCTION
Name of the JavaScript function which handles changes to the selected list |
static java.lang.String |
SEPARATOR_VALUE
The string used as a separator between the selected values |
static java.lang.String |
SPACER_STRING
|
static java.lang.String |
UPDATEBUTTONS_FUNCTION
Name of the JavaScript function that updates the buttons |
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 | |
AddRemove()
Constructor for the AddRemove component |
Method Summary | |
javax.faces.component.UIComponent |
getAddAllButtonComponent()
Get or create the ADD button. |
javax.faces.component.UIComponent |
getAddButtonComponent(javax.faces.context.FacesContext context)
Get or create the ADD button. |
java.lang.String |
getAllValues()
This function returns a String consisting of the String representation of the values of all the available Options, separated by the separator String (see getSeparator()) |
javax.faces.component.UIComponent |
getAvailableLabelComponent()
Gets or creates a component for the "available" list label. |
javax.faces.component.UIComponent |
getHeaderComponent()
Gets or creates a component for the "component" list label. |
java.util.Iterator |
getListItems(javax.faces.context.FacesContext context,
boolean rulerAtEnd)
Retrieve an Iterator of ListSelector.ListItem representing the available selections only. |
javax.faces.component.UIComponent |
getMoveDownButtonComponent()
Get or create the MOVEDOWN button. |
javax.faces.component.UIComponent |
getMoveUpButtonComponent()
Get or create the MOVEUP button. |
java.lang.String |
getPrimaryElementID(javax.faces.context.FacesContext context)
Implement this method so that it returns the DOM ID of the HTML element which should receive focus when the component receives focus, and to which a component label should apply. |
javax.faces.component.UIComponent |
getRemoveAllButtonComponent()
Get or create the REMOVE button. |
javax.faces.component.UIComponent |
getRemoveButtonComponent()
Get or create the REMOVE button. |
int |
getRows()
Get the number of rows to disaplay (the default is 12) |
java.util.Iterator |
getSelectedItems()
Returns an iterator over the selected items |
javax.faces.component.UIComponent |
getSelectedLabelComponent()
Gets or creates a component for the "selected" list label. |
java.util.Iterator |
getSelectedListItems()
Retrieve an Iterator of ListSelector.ListItem representing the selected selections only. |
java.lang.String |
getSelectedValues()
This function returns a String consisting of the String representation of the values of the selected Options, separated by the separator String |
java.lang.String |
getSeparator()
Get the separator string that is used to separate the selected values on the client. |
boolean |
mainListSubmits()
|
protected void |
markSelectedListItems(java.util.List list,
boolean processed)
Marks options corresponding to objects listed as values of this components as selected. |
protected void |
processOptions(javax.faces.context.FacesContext context,
java.text.Collator collator,
java.util.Locale locale,
boolean rulerAtEnd)
Evaluates the list of available Options, creating a ListItem for each one. |
Methods inherited from class com.sun.rave.web.ui.component.AddRemoveBase |
getAvailableItemsLabel, getFamily, getSelectedItemsLabel, getToolTip, isDuplicateSelections, isMoveButtons, isSelectAll, isSorted, isVertical, restoreState, saveState, setAvailableItemsLabel, setDuplicateSelections, setMoveButtons, setSelectAll, setSelectedItemsLabel, setSorted, setToolTip, setVertical |
Methods inherited from class com.sun.rave.web.ui.component.ListSelector |
checkSelectionModel, createListItem, getLabelComponent, getListItems, getOptions, getReadOnlyValueComponent, getSeparatorLength, getValueAsReadOnly, getValueAsStringArray, processOptions, processSelections |
Methods inherited from class com.sun.rave.web.ui.component.ListSelectorBase |
isLabelOnTop, isSeparators, isVisible, setLabelOnTop, setRows, setSeparators, setVisible |
Methods inherited from class com.sun.rave.web.ui.component.Selector |
compareValues, getConvertedValue, getLabelLevel, getRendersChildren, getValueAsReadOnly, isMultiple, setMultiple, 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, 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, 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 |
getReadOnlyValueComponent, getToolTip, getValueAsStringArray, 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 |
public static final java.lang.String ADD_BUTTON_ID
public static final java.lang.String ADD_BUTTON_FACET
public static final java.lang.String ADDALL_BUTTON_ID
public static final java.lang.String ADDALL_BUTTON_FACET
public static final java.lang.String REMOVE_BUTTON_ID
public static final java.lang.String REMOVE_BUTTON_FACET
public static final java.lang.String REMOVEALL_BUTTON_ID
public static final java.lang.String REMOVEALL_BUTTON_FACET
public static final java.lang.String MOVEUP_BUTTON_ID
public static final java.lang.String MOVEUP_BUTTON_FACET
public static final java.lang.String MOVEDOWN_BUTTON_ID
public static final java.lang.String MOVEDOWN_BUTTON_FACET
public static final java.lang.String AVAILABLE_LABEL_ID
public static final java.lang.String AVAILABLE_LABEL_FACET
public static final java.lang.String SELECTED_LABEL_ID
public static final java.lang.String SELECTED_LABEL_FACET
public static final java.lang.String HEADER_FACET
public static final java.lang.String HEADER_ID
public static final java.lang.String FOOTER_FACET
public static final java.lang.String AVAILABLE_ID
public static final java.lang.String SELECTED_ID
public static final java.lang.String JSOBJECT
public static final java.lang.String JAVASCRIPT_PREFIX
public static final java.lang.String RETURN
public static final java.lang.String ADD_FUNCTION
public static final java.lang.String ADDALL_FUNCTION
public static final java.lang.String REMOVE_FUNCTION
public static final java.lang.String REMOVEALL_FUNCTION
public static final java.lang.String MOVEUP_FUNCTION
public static final java.lang.String MOVEDOWN_FUNCTION
public static final java.lang.String UPDATEBUTTONS_FUNCTION
public static final java.lang.String AVAILABLE_ONCHANGE_FUNCTION
public static final java.lang.String SELECTED_ONCHANGE_FUNCTION
public static final java.lang.String MULTIPLEADDITIONS_FUNCTION
public static final java.lang.String SPACER_STRING
public static final java.lang.String SEPARATOR_VALUE
Constructor Detail |
public AddRemove()
Method Detail |
public int getRows()
getRows
in interface ListManager
getRows
in class ListSelectorBase
public java.lang.String getSeparator()
public java.util.Iterator getSelectedItems()
public java.lang.String getAllValues()
public java.lang.String getSelectedValues()
public javax.faces.component.UIComponent getAddButtonComponent(javax.faces.context.FacesContext context)
context
- The FacesContext for the request
public javax.faces.component.UIComponent getAddAllButtonComponent()
public javax.faces.component.UIComponent getRemoveButtonComponent()
public javax.faces.component.UIComponent getRemoveAllButtonComponent()
public javax.faces.component.UIComponent getMoveUpButtonComponent()
public javax.faces.component.UIComponent getMoveDownButtonComponent()
public javax.faces.component.UIComponent getAvailableLabelComponent()
public javax.faces.component.UIComponent getSelectedLabelComponent()
public javax.faces.component.UIComponent getHeaderComponent()
public java.lang.String getPrimaryElementID(javax.faces.context.FacesContext context)
ComplexComponent
getPrimaryElementID
in interface ComplexComponent
getPrimaryElementID
in class ListSelector
public java.util.Iterator getListItems(javax.faces.context.FacesContext context, boolean rulerAtEnd) throws javax.faces.FacesException
getListItems
in interface ListManager
getListItems
in class ListSelector
context
- The FacesContext used for the requestrulerAtEnd
- If true, a disabled list item with a blank label is appended at
the end of the options. The role of the blank
item is to guarantee that the width of the lists
do not change when items are moved from one to the
other.
ListItem
.
javax.faces.FacesException
- If something goes wrong when the options are processedprotected void processOptions(javax.faces.context.FacesContext context, java.text.Collator collator, java.util.Locale locale, boolean rulerAtEnd)
context
- The FacesContextrulerAtEnd
- the end of the options. The role of the blank
item is to guarantee that the width of the lists
do not change when items are moved from one to the
other.public java.util.Iterator getSelectedListItems()
protected void markSelectedListItems(java.util.List list, boolean processed)
markSelectedListItems
in class ListSelector
list
- A list representation of the selected valuesprocessed
- If true, compare the values object by
object (this is done if we compare the value of the object with
with the list items). If false, perform a string comparison of
the string representation of the submitted value of the
component with the string representation of the value from the
list items (this is done if we compare the submitted values
with the list items).public boolean mainListSubmits()
mainListSubmits
in interface ListManager
mainListSubmits
in class ListSelector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |