public class GenericItemListChip extends ItemListChip implements ItemAcceptor, AttributeValueChangeListener
ItemListChip, constructing the layout from the XML layout file.| Modifier and Type | Field and Description |
|---|---|
static String |
ADD |
static String |
COPY_EVENT |
static String |
CREATE |
static String |
DELETE_ICON |
static String |
DELETE_NEW_ENTRY |
protected static Logger |
LOG |
static String |
OPEN_EDITOR |
static String |
OPEN_EDITOR_EXTERNAL |
static String |
OPEN_EDITOR_INTERNAL |
static String |
REMOVE |
static String |
SELECT_ALL |
static String |
SELECT_VISIBLE |
CHIP_KEY, FALSE, FRAME_KEY, SHOW_JSP_COMMENTS, TRUE, USE_SOCKET_NAMINGDISPLAY_EVENT, FILTERED_PREFIX| Constructor and Description |
|---|
GenericItemListChip(DisplayState displayState,
Chip parent,
ComposedType type,
boolean isPartOf)
The List is per default editable.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCreationPreset(HMCHelper.AttributePreset preset) |
void |
addSearchPreset(HMCHelper.AttributePreset preset) |
boolean |
allowsMultipleSelection()
Method which has to be implemented for
ItemAcceptor interface. |
boolean |
canAdd() |
boolean |
canCreate() |
boolean |
canPaste() |
boolean |
canRemove() |
void |
clearListEntries()
Overrides
ListChip.clearListEntries() to additionally remove a possible
new (create) entry. |
void |
clearSelectedListEntries()
Overrides
ListChip.clearSelectedListEntries() to additionally clear the
'is all selected' flag. |
protected GenericItemListEntryChip |
createListEntryChip(Item item)
Depending on whether the entries of this list should be editable a
GenericItemListEntryChip or an
EditableItemListEntryChip will be created. |
protected CreateItemListEntryChip |
createNewItemEntry(Map values)
Deprecated.
use
createNewItemEntry(Map, ComposedType) instead! |
protected CreateItemListEntryChip |
createNewItemEntry(Map values,
ComposedType type) |
AbstractToolbarChip |
createToolbar() |
boolean |
entriesEditable() |
protected List |
getAssignableItemsFromClipboard() |
protected Collection<String> |
getCreationPresetQualifiers() |
Collection<HMCHelper.AttributePreset> |
getCreationPresets() |
protected ReferenceEditorNode |
getEditorNode() |
Collection |
getElementTypes() |
GenericItemListEntryChip |
getEntry(int pos) |
GenericItemListEntryChip |
getEntryForItem(Item item) |
int |
getIndexOf(GenericItemListEntryChip entry) |
String |
getItemNotValidErrorMessage()
Returns a localized error message in case one or more list entrys are not valid.
|
String |
getJSPURI()
Returns the URI of the JSP that this chip wants to use.
|
int |
getMaxCount() |
List<MenuEntry> |
getMenuEntries()
Here you can specify what Actions you are able to perform at the moment.
|
protected int |
getMode() |
CreateItemListEntryChip |
getNewItemEntry() |
String |
getPresetAttributeName() |
ComposedType |
getPresetSearchType() |
List |
getRestrictedListEntries()
Returns the list of itementries, containing no more than getMaxCount() entries.
|
ReferenceAttributeEditorChip |
getSearchEditor()
Gets the search editor instance if enabled.
|
Collection |
getSearchPresets() |
protected Collection<String> |
getVisibleQualifiers() |
int |
getWidth() |
boolean |
isAllSelected() |
boolean |
isAutoPerform()
Returns true if the search should be performed automatically when adding items.
|
protected boolean |
isAutoPerform(ComposedType type) |
boolean |
isAutoSave()
Returns true if 'autosave' is enabled.
|
boolean |
isChanged()
Returns true if at least one of the (editable) entries has been changed.
|
boolean |
isConsiderSubtypes() |
boolean |
isEditable() |
boolean |
isExternalCreate()
Deprecated.
use
isExternalCreate(ComposedType) to refine by selected ComposedType |
boolean |
isExternalCreate(ComposedType type) |
boolean |
isMarkedAsMandatory(String qualifier)
Returns true if the attribute denoted by the given qualifier ist mandatory, writable/initial and of a non-boolean
type.
|
boolean |
isPartOfAttribute() |
boolean |
isProhibitOpening() |
boolean |
isSelectVisible() |
protected boolean |
mandatoryNotAccessible()
Deprecated.
use
mandatoryNotAccessible(ComposedType) to refine by ComposedType |
protected boolean |
mandatoryNotAccessible(ComposedType type) |
void |
notifyAttributeValueChange(AttributeValueChangeEvent event) |
protected void |
openEditor() |
protected void |
openEditor(boolean external) |
void |
processEvents(Map<String,List<String>> events)
Handles all incoming requests for this chip.
|
protected void |
refreshEntries() |
void |
save() |
void |
saveNewItemEntry() |
void |
setAutoPerform(boolean autoPerform) |
void |
setAutoSave(boolean auto) |
void |
setCanAdd(boolean canAdd) |
void |
setCanRemove(boolean canRemove) |
void |
setConsiderSubtypes(boolean considerSubtypes) |
void |
setCreate(boolean value) |
void |
setElementType(ComposedType type) |
void |
setElementTypes(Collection types) |
void |
setEntriesEditable(boolean editable)
If this is set to true the entries in this list will be editable, i.e.
|
void |
setExternalCreate(boolean externalCreate) |
void |
setMaxCount(int count)
Sets the maximum number of entries to be shown, 0 means 'unlimited'.
|
void |
setNewItemEntry(CreateItemListEntryChip newItemEntry) |
void |
setPresetAttributeName(String presetAttributeName) |
void |
setPresetSearchType(String searchTypeCode) |
void |
setProhibitOpening(boolean prohibitOpening) |
void |
setSearchEditor(ReferenceAttributeEditorChip editor)
Sets the search editor which is located at the bottom of the list and can be used for searching items for adding
to the list.
At the editor the refreshAfterSelect flag will be enabled for refreshing the list view. |
void |
setSelectedItems(List items)
Method which has to be implemented for
ItemAcceptor interface. |
void |
setSelectVisible(boolean visibleFlag) |
void |
setWidth(int width) |
void |
showSearchEditor(boolean enable)
Deprecated.
use
setSearchEditor(ReferenceAttributeEditorChip) instead |
protected boolean |
subTypesVisible()
Returns true if the element type or at least one of its subtypes is visible and non-abstract.
|
checkValid, getAttributeNodes, getAttributeWidths, getChildNodes, getHeaderCount, getHeaderQualifiers, getItemLayoutNode, getItemType, getTitle, getToolbar, hasFancyRows, setItemLayoutNode, setItemTypeaddListEntry, addSelectedListEntries, addSelectedListEntry, getListEntries, getListEntryCount, getPosition, getSelectedListEntries, getSelectedListEntryCount, isListEntrySelected, isMultipleSelectionAllowed, moveDown, moveUp, removeListEntry, setFancyRows, setMultipleSelection, setMultipleSelectionAllowed, sort, sortaddEventListener, clearInfoMessages, clone, containsDisplayEvent, createMenuEntriesForJS, dispose, errorQueueEmpty, getClipboard, getCommandID, getDisplayParameters, getDisplayState, getEventID, getEventURL, getEventValue, getFrame, getID, getInfoMessages, getJaloSession, getLocalizedString, getLocalizedString, getLogger, getNameSpace, getNameSpaceFor, getParent, getProposedUniqueName, getProposedUniqueNameFor, getRequestFocus, getSessionIdentifier, getStringValue, getUniqueName, getWindow, goFullScreen, hasVisibleContextMenuEntries, isButtonPushed, 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, dispose, getCommandID, getDisplayParameters, getDisplayState, getEventID, getEventURL, getEventValue, getID, getJaloSession, getParent, getUniqueName, goFullScreen, isValid, leaveFullScreen, registerUniqueName, removeEventListener, render, translateFormFieldToEventName, translateFormFieldToEventValueprotected static final Logger LOG
public static final String SELECT_VISIBLE
public static final String REMOVE
public static final String ADD
public static final String CREATE
public static final String SELECT_ALL
public static final String OPEN_EDITOR
public static final String OPEN_EDITOR_INTERNAL
public static final String OPEN_EDITOR_EXTERNAL
public static final String COPY_EVENT
public static final String DELETE_ICON
public static final String DELETE_NEW_ENTRY
public GenericItemListChip(DisplayState displayState, Chip parent, ComposedType type, boolean isPartOf)
type - The type of the elements of the list.isPartOf - True, if the edited attributedescriptor is partof.public void processEvents(Map<String,List<String>> events)
ChipprocessEvents in interface ChipprocessEvents in class ListChipprotected ReferenceEditorNode getEditorNode()
protected CreateItemListEntryChip createNewItemEntry(Map values, ComposedType type)
values - @Deprecated protected CreateItemListEntryChip createNewItemEntry(Map values)
createNewItemEntry(Map, ComposedType) instead!protected GenericItemListEntryChip createListEntryChip(Item item)
GenericItemListEntryChip or an
EditableItemListEntryChip will be created.item - the Item for which to create the list entryprotected int getMode()
getMode in class ItemListChippublic void setSelectedItems(List items)
ItemAcceptor interface.setSelectedItems in interface ItemAcceptorpublic boolean allowsMultipleSelection()
ItemAcceptor interface.allowsMultipleSelection in interface ItemAcceptorpublic boolean isEditable()
public String getJSPURI()
Chippublic String getItemNotValidErrorMessage()
ListChipgetItemNotValidErrorMessage in class ListChippublic void save()
protected void refreshEntries()
public int getIndexOf(GenericItemListEntryChip entry)
public GenericItemListEntryChip getEntryForItem(Item item)
public GenericItemListEntryChip getEntry(int pos)
public boolean canAdd()
public boolean canRemove()
public void setCanAdd(boolean canAdd)
public void setCanRemove(boolean canRemove)
public boolean canCreate()
public void setCreate(boolean value)
public boolean isAutoSave()
public void setAutoSave(boolean auto)
public void setEntriesEditable(boolean editable)
editable - if true the entries in this list will be editablepublic boolean entriesEditable()
public AbstractToolbarChip createToolbar()
createToolbar in interface ToolbarProviderpublic boolean canPaste()
protected List getAssignableItemsFromClipboard()
protected boolean subTypesVisible()
public boolean isAllSelected()
public void clearSelectedListEntries()
ListChip.clearSelectedListEntries() to additionally clear the
'is all selected' flag.clearSelectedListEntries in class ListChippublic void setPresetAttributeName(String presetAttributeName)
public String getPresetAttributeName()
public boolean isSelectVisible()
public void setSelectVisible(boolean visibleFlag)
public int getMaxCount()
public void setMaxCount(int count)
public List getRestrictedListEntries()
public boolean isPartOfAttribute()
public boolean isAutoPerform()
protected boolean isAutoPerform(ComposedType type)
public void setAutoPerform(boolean autoPerform)
autoPerform - true if the search should be performed automatically when adding items.public int getWidth()
public void setWidth(int width)
public Collection<HMCHelper.AttributePreset> getCreationPresets()
public Collection getSearchPresets()
public void addCreationPreset(HMCHelper.AttributePreset preset)
preset - public void addSearchPreset(HMCHelper.AttributePreset preset)
preset - public void clearListEntries()
ListChip.clearListEntries() to additionally remove a possible
new (create) entry.clearListEntries in class ListChippublic boolean isChanged()
public void setElementType(ComposedType type)
public void setElementTypes(Collection types)
public Collection getElementTypes()
@Deprecated public boolean isExternalCreate()
isExternalCreate(ComposedType) to refine by selected ComposedTypepublic boolean isExternalCreate(ComposedType type)
@Deprecated protected boolean mandatoryNotAccessible()
mandatoryNotAccessible(ComposedType) to refine by ComposedTypeprotected boolean mandatoryNotAccessible(ComposedType type)
protected Collection<String> getVisibleQualifiers()
protected Collection<String> getCreationPresetQualifiers()
public void setExternalCreate(boolean externalCreate)
public boolean isConsiderSubtypes()
public void setConsiderSubtypes(boolean considerSubtypes)
public CreateItemListEntryChip getNewItemEntry()
public void setNewItemEntry(CreateItemListEntryChip newItemEntry)
public void saveNewItemEntry()
public ComposedType getPresetSearchType()
public void setPresetSearchType(String searchTypeCode)
protected void openEditor()
protected void openEditor(boolean external)
external - if true the editor will be opened in a new windowpublic List<MenuEntry> getMenuEntries()
AbstractChipgetMenuEntries in interface ChipgetMenuEntries in class AbstractChipAbstractChip.getMenuEntries()public boolean isMarkedAsMandatory(String qualifier)
@Deprecated public void showSearchEditor(boolean enable)
setSearchEditor(ReferenceAttributeEditorChip) insteadUploadToMediaEditorChip will be used, otherwise a
AutocompleteReferenceEditorChip.enable - true for enabling search editor, otherwise falsepublic void setSearchEditor(ReferenceAttributeEditorChip editor)
AttributeValueChangeListener to the editor for getting the selected value.editor - the search editor to usepublic ReferenceAttributeEditorChip getSearchEditor()
public void notifyAttributeValueChange(AttributeValueChangeEvent event)
notifyAttributeValueChange in interface AttributeValueChangeListenerpublic boolean isProhibitOpening()
public void setProhibitOpening(boolean prohibitOpening)
Copyright © 2017 SAP SE. All Rights Reserved.