Class AbstractListViewAction
- java.lang.Object
-
- de.hybris.platform.cockpit.components.listview.AbstractListViewAction
-
- All Implemented Interfaces:
AdvancedListViewAction
,ListViewAction
- Direct Known Subclasses:
AbstractCommentAction
,AbstractJobListViewAction
,AbstractMultiSelectOnlyAction
,AbstractPerspectiveSwitchAction
,AbstractProductAction
,AbstractSynchronizationAction
,ActivateItemAction
,ClassificationAction
,ClonesAction
,CoverageInfoAction
,DecisionAction
,DefaultExportEditorAreaAction
,DeleteAction
,DuplicateAction
,EditItemAction
,NewItemAction
,PendingAction
,RecalculateOrderAction
,SplitterDummyAction
,TaskStatusAction
public abstract class AbstractListViewAction extends java.lang.Object implements AdvancedListViewAction
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.hybris.platform.cockpit.components.listview.ListViewAction
ListViewAction.Context
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
alwaysEnabled
protected java.lang.String
IN_EDITOR_AREA_SECTION_PANEL
-
Fields inherited from interface de.hybris.platform.cockpit.components.listview.ListViewAction
AFFECTED_ITEMS_KEY
-
-
Constructor Summary
Constructors Constructor Description AbstractListViewAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ListViewAction.Context
createContext(ListComponentModel listModel, TypedObject item)
Initialize values only once to be used by following service methodsListViewAction.Context
createContext(TableModel model, TypedObject item, ColumnDescriptor column)
Initialize values only once to be used by following service methodsprotected abstract void
doCreateContext(ListViewAction.Context context)
protected TypedObject
getItem(ListViewAction.Context context)
org.zkoss.zk.ui.event.EventListener
getMultiSelectEventListener(ListViewAction.Context context)
Gets theEventListener
for selection operation which is to be registered for theEvents.ON_CLICK
event.java.lang.String
getMultiSelectImageURI(ListViewAction.Context context)
Gets the image URI for selection operation which represents the action button.org.zkoss.zul.Menupopup
getMultiSelectPopup(ListViewAction.Context context)
Gets the popup of the action button for selection operation.java.util.List<TypedObject>
getSelectedItems(ListViewAction.Context context)
java.lang.String
getStatusCode(ListViewAction.Context context)
Get a status code for this action.boolean
isAlwaysEnabled()
Specifies whether this action should be enabled even though the component (where this action is used) is marked as non-editable.void
sendEvent(java.lang.String event, ContextAreaValueContainer cavc, ListViewAction.Context context)
protected void
sendUpdateItemsEvent(ListViewAction.Context context)
void
setAlwaysEnabled(boolean alwaysEnabled)
Sets whether this action is always enabled or not.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.cockpit.components.listview.ListViewAction
getContextPopup, getEventListener, getImageURI, getPopup, getTooltip
-
-
-
-
Method Detail
-
isAlwaysEnabled
public boolean isAlwaysEnabled()
Description copied from interface:AdvancedListViewAction
Specifies whether this action should be enabled even though the component (where this action is used) is marked as non-editable.- Specified by:
isAlwaysEnabled
in interfaceAdvancedListViewAction
- Returns:
true
if this action is always enabled,false
otherwise
-
setAlwaysEnabled
public void setAlwaysEnabled(boolean alwaysEnabled)
Description copied from interface:AdvancedListViewAction
Sets whether this action is always enabled or not.- Specified by:
setAlwaysEnabled
in interfaceAdvancedListViewAction
- Parameters:
alwaysEnabled
-true
means this action will always be enabled even though the component is marked as non-editable
-
createContext
public ListViewAction.Context createContext(TableModel model, TypedObject item, ColumnDescriptor column)
Description copied from interface:ListViewAction
Initialize values only once to be used by following service methods- Specified by:
createContext
in interfaceListViewAction
- Returns:
- Context containing computed value for subsequent service calls
-
createContext
public ListViewAction.Context createContext(ListComponentModel listModel, TypedObject item)
Description copied from interface:ListViewAction
Initialize values only once to be used by following service methods- Specified by:
createContext
in interfaceListViewAction
- Returns:
- Context containing computed value for subsequent service calls
-
sendEvent
public void sendEvent(java.lang.String event, ContextAreaValueContainer cavc, ListViewAction.Context context)
-
sendUpdateItemsEvent
protected void sendUpdateItemsEvent(ListViewAction.Context context)
-
doCreateContext
protected abstract void doCreateContext(ListViewAction.Context context)
-
getStatusCode
public java.lang.String getStatusCode(ListViewAction.Context context)
Description copied from interface:ListViewAction
Get a status code for this action. This is used e.g. by the id generator.- Specified by:
getStatusCode
in interfaceListViewAction
- Parameters:
context
- the Context- Returns:
- a custom string defined by the instance of listviewaction
-
getMultiSelectImageURI
public java.lang.String getMultiSelectImageURI(ListViewAction.Context context)
Description copied from interface:ListViewAction
Gets the image URI for selection operation which represents the action button.- Specified by:
getMultiSelectImageURI
in interfaceListViewAction
- Returns:
- URI of the image to represent the action button or null, if action doesn't support multi select operation
-
getMultiSelectEventListener
public org.zkoss.zk.ui.event.EventListener getMultiSelectEventListener(ListViewAction.Context context)
Description copied from interface:ListViewAction
Gets theEventListener
for selection operation which is to be registered for theEvents.ON_CLICK
event.- Specified by:
getMultiSelectEventListener
in interfaceListViewAction
- Returns:
- the event listener which should be called when user clicks the action button
-
getMultiSelectPopup
public org.zkoss.zul.Menupopup getMultiSelectPopup(ListViewAction.Context context)
Description copied from interface:ListViewAction
Gets the popup of the action button for selection operation.- Specified by:
getMultiSelectPopup
in interfaceListViewAction
- Returns:
- the popup which should appear when the user clicks the action button or
null
if no popup is available
-
getSelectedItems
public java.util.List<TypedObject> getSelectedItems(ListViewAction.Context context)
-
getItem
protected TypedObject getItem(ListViewAction.Context context)
-
-