public abstract class AbstractSelectToolbarActionChip extends AbstractToolbarActionChip
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractSelectToolbarActionChip.Entry |
static class |
AbstractSelectToolbarActionChip.EntryComparator
Default comparator for Entries.
|
AbstractToolbarActionChip.ToolbarActionListener| Modifier and Type | Field and Description |
|---|---|
static String |
URI |
accepted, ALIGN_LEFT, ALIGN_RIGHT, PERFORMCHIP_KEY, FALSE, FRAME_KEY, SHOW_JSP_COMMENTS, TRUE, USE_SOCKET_NAMINGDISPLAY_EVENT, FILTERED_PREFIX| Constructor and Description |
|---|
AbstractSelectToolbarActionChip(DisplayState displayState,
AbstractToolbarChip parent,
String label,
String event,
String javascript)
Creates a new AbstractSelectToolbarActionChip which can be placed in an AbstractToolbarChip.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
assureUniqueDisplayValues(Collection<AbstractSelectToolbarActionChip.Entry> entries) |
boolean |
containsDisplayValue(String displayValue) |
boolean |
containsValue(Object value) |
protected abstract List |
createEntries()
Must be implemented by subclasses and should return a list containing the entries of this selector.
|
Comparator |
getComparator() |
protected AbstractSelectToolbarActionChip.Entry |
getDefaultSelectedEntry() |
List |
getEntries()
Returns this selector's entries.
|
protected AbstractSelectToolbarActionChip.Entry |
getEntryByDisplayValue(String displayValue)
Returns the Entry with the given displayValue or null if the Entry could not be found.
|
protected AbstractSelectToolbarActionChip.Entry |
getEntryByValue(Object value)
Returns the Entry with the given value or null if the Entry could not be found.
|
String |
getJSPURI()
Returns the uri for the jsp corresponding to this chip.
|
AbstractSelectToolbarActionChip.Entry |
getSelectedEntry()
Returns the currently selected Entry.
|
Object |
getSelectedValue()
Returns the currently selected Entry value object.
|
boolean |
isButtonPushed(List eventValues,
String eventName)
Superclass method overridden to enable button-like behaviour for lists too
|
boolean |
isCommandAction() |
boolean |
isEmpty()
Returns true, if there are no entries defined for this select chip.
|
boolean |
isEnabled()
Is overridden to additionally test whether the selector contains more than one entry.
|
boolean |
isSelected(AbstractSelectToolbarActionChip.Entry entry)
Returns true if the given Entry is equal to the currently selected Entry.
|
boolean |
isSelected(String displayValue)
Returns true if the given displayValue equals the displayValue of the currently selected Entry.
|
void |
processEvents(Map events)
If the event of this selector is found, the appropriate entry will be selected.
|
void |
resetEntries()
Sets the entries list null to force the call of createEntries() the next time getEntries() is invoked, thus
resetting/refreshing the entries list.
|
void |
setCommandAction(boolean commandAction) |
void |
setComparator(Comparator comparator) |
void |
setSelectedEntry(AbstractSelectToolbarActionChip.Entry entry)
Set the currently selected Entry.
|
void |
setSelectedEntryByDisplayValue(String displayValue) |
void |
setSelectedValue(Object value) |
void |
setUseComparator(boolean useComparator) |
boolean |
useComparator() |
addActionListener, getAcceptedEvents, getAccessKey, getAlignment, getConfirmationMessage, getEvent, getJavaScript, getLabel, getProposedUniqueName, getToolbarType, getTooltip, getWidth, isPartOf, isVisible, notifyActionPerformed, perform, removeActionListener, setAccessKey, setAlignment, setConfirmationMessage, setEnabled, setEvent, setJavaScript, setLabel, setShowLabel, setTooltip, setVisible, setWidth, showLabeladdEventListener, checkValid, clearInfoMessages, clone, containsDisplayEvent, createMenuEntriesForJS, dispose, errorQueueEmpty, getClipboard, getCommandID, getDisplayParameters, getDisplayState, getEventID, getEventURL, getEventValue, getFrame, getID, getInfoMessages, getJaloSession, getLocalizedString, getLocalizedString, getLogger, getMenuEntries, getNameSpace, getNameSpaceFor, getParent, getProposedUniqueNameFor, getRequestFocus, getSessionIdentifier, getStringValue, getUniqueName, getWindow, goFullScreen, hasVisibleContextMenuEntries, isButtonPushed, isErrorQueueEmpty, isValid, leaveFullScreen, notifyEventListeners, notifyEventListeners, postErrorMessage, postInfoMessage, postWindowEvent, refresh, refreshChild, registerUniqueName, removeEventListener, removeInfoMessage, render, render, setClipboard, setParent, setRequestFocus, setValid, setWindowStatus, translateFormFieldToEventName, translateFormFieldToEventValueequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddEventListener, checkValid, dispose, getCommandID, getDisplayParameters, getDisplayState, getEventID, getEventURL, getEventValue, getID, getJaloSession, getMenuEntries, getParent, getUniqueName, goFullScreen, isValid, leaveFullScreen, registerUniqueName, removeEventListener, render, translateFormFieldToEventName, translateFormFieldToEventValuepublic static final String URI
public AbstractSelectToolbarActionChip(DisplayState displayState, AbstractToolbarChip parent, String label, String event, String javascript)
displayState - the current DisplayStateparent - the parent of this chip, usually this would be the chip which creates thislabel - event - javascript - public String getJSPURI()
getJSPURI in interface ChipgetJSPURI in class AbstractToolbarActionChipprotected abstract List createEntries()
public List getEntries()
useComparator() returns true, the list will be sorted using the
Comparator returned by getComparator().protected void assureUniqueDisplayValues(Collection<AbstractSelectToolbarActionChip.Entry> entries)
public void resetEntries()
public Object getSelectedValue()
public void setSelectedValue(Object value)
public AbstractSelectToolbarActionChip.Entry getSelectedEntry()
protected AbstractSelectToolbarActionChip.Entry getDefaultSelectedEntry()
public void setSelectedEntry(AbstractSelectToolbarActionChip.Entry entry)
entry - public void setSelectedEntryByDisplayValue(String displayValue)
public boolean containsValue(Object value)
value - the object to look forpublic boolean containsDisplayValue(String displayValue)
displayValue - the String to look forpublic boolean isSelected(AbstractSelectToolbarActionChip.Entry entry)
entry - public boolean isSelected(String displayValue)
displayValue - public void processEvents(Map events)
processEvents in interface ChipprocessEvents in class AbstractToolbarActionChippublic boolean isButtonPushed(List eventValues, String eventName)
isButtonPushed in class AbstractChipAbstractChip.isButtonPushed(java.util.List, java.lang.String)protected AbstractSelectToolbarActionChip.Entry getEntryByDisplayValue(String displayValue)
displayValue - protected AbstractSelectToolbarActionChip.Entry getEntryByValue(Object value)
value - the value object to look forpublic boolean isEmpty()
public void setCommandAction(boolean commandAction)
commandAction - true if this action chip should be a command action.public boolean isCommandAction()
public boolean isEnabled()
isEnabled in class AbstractToolbarActionChippublic Comparator getComparator()
Comparator used to sort the List of Entrys if
useComparator() returns true. The Entries will be sorted each time
createEntries() is called. If no Comparator is set (using
setComparator(Comparator), the default Comparator
AbstractSelectToolbarActionChip.EntryComparator is used.public void setComparator(Comparator comparator)
public void setUseComparator(boolean useComparator)
useComparator - Set to true to enable sorting of the entry list. The Comparator returned by
getComparator() is used to sort the list.public boolean useComparator()
true, if the entry list should be sorted.Copyright © 2017 SAP SE. All Rights Reserved.