Class ConfigurableMultiReferenceEditor<V,D extends AbstractEditorData>
java.lang.Object
com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
de.hybris.platform.adaptivesearchbackoffice.editors.configurablemultireference.ConfigurableMultiReferenceEditor<V,D>
- All Implemented Interfaces:
com.hybris.cockpitng.editors.CockpitEditorRenderer<Collection<V>>,com.hybris.cockpitng.engine.ComponentWidgetAdapterAware,MultiReferenceEditorLogic<D,,V> EditorLogic<Collection<V>>
public class ConfigurableMultiReferenceEditor<V,D extends AbstractEditorData>
extends com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
implements com.hybris.cockpitng.editors.CockpitEditorRenderer<Collection<V>>, MultiReferenceEditorLogic<D,V>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final intprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final intprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final PatternFields inherited from interface com.hybris.cockpitng.editors.CockpitEditorRenderer
INITIAL_EDIT_STRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildItemStyleClass(AbstractEditorData editorData) protected booleanprotected DataHandlerprotected org.zkoss.zul.ListModel<D>createFilteredListModel(org.zkoss.zul.ListModel<D> originalListModel, String filter) protected EditorRendererprotected EditorRendererprotected org.zkoss.zul.ListModel<D>protected voidcreateReference(Object data) protected Objectcom.hybris.cockpitng.components.EditorfindEditor(org.zkoss.zk.ui.Component component) Finds the nearest editor component.org.zkoss.zk.ui.ComponentfindEditorItem(org.zkoss.zk.ui.Component component) Finds the nearest editor item component.Returns the columns.Returns the editor context.Returns the data handler.Returns the editable columns.com.hybris.cockpitng.editors.EditorContext<Collection<V>>Returns the editor context.com.hybris.cockpitng.editors.EditorListener<Collection<V>>Returns the editor listener.Returns the renderer for the item detail section.Returns the renderer for the item master section.org.zkoss.zul.ListModel<D>Returns the list model.protected Objectprotected Stringcom.hybris.cockpitng.engine.WidgetInstanceManagerReturns the widget instance manager.protected voidhandleDropEvent(org.zkoss.zk.ui.event.Event event) booleanisOpen(org.zkoss.zk.ui.Component component) Returns whether the given component is open.booleanReturns whether the editor items can be sorted.voidrender(org.zkoss.zk.ui.Component parent, com.hybris.cockpitng.editors.EditorContext<Collection<V>> editorContext, com.hybris.cockpitng.editors.EditorListener<Collection<V>> editorListener) protected voidrenderItem(org.zkoss.zul.Listitem listitem, AbstractEditorData editorData) protected voidrenderItemDetail(org.zkoss.zk.ui.Component item, AbstractEditorData editorData) protected voidrenderItemDetailHelper(org.zkoss.zk.ui.Component parent, AbstractEditorData editorData, boolean open) protected voidrenderItemMaster(org.zkoss.zk.ui.Component item, AbstractEditorData editorData) protected voidrenderList(org.zkoss.zk.ui.Component parent) protected Stringprotected Collection<String>protected ObjectresolveParentObject(org.zkoss.zk.ui.Component parent) protected SearchResultDataprotected booleanprotected StringresolveTypeCode(Object object) protected voidsetColumns(Collection<String> columns) protected voidsetContext(String context) protected voidsetDataHandler(DataHandler<D, V> dataHandler) protected voidsetEditableColumns(Collection<String> editableColumns) protected voidsetEditorContext(com.hybris.cockpitng.editors.EditorContext<Collection<V>> editorContext) protected voidsetEditorListener(com.hybris.cockpitng.editors.EditorListener<Collection<V>> editorListener) protected voidsetItemDetailRenderer(EditorRenderer itemDetailRenderer) protected voidsetItemMasterRenderer(EditorRenderer itemMasterRenderer) protected voidsetListModel(org.zkoss.zul.ListModel<D> listModel) voidsetOpen(org.zkoss.zk.ui.Component component, boolean open) Changes the open status of a component.protected voidsetParentObject(Object parentObject) protected voidsetParentTypeCode(String parentTypeCode) protected voidsetSortable(boolean sortable) voidTriggers the creation of a new item.voidtriggerUpdateReference(AbstractEditorData editorData) Triggers the update of an existing item.voidupdateAttributeValue(D data, String attributeName, Object attributeValue) Updates the value of an item attribute.protected voidupdateReference(Object data) voidupdateValue(Collection<V> value) Updates the value of the editor.Methods inherited from class com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
addSocketInputEventListener, getComponentID, handleSocketInputEvent, initialize, initializeDefaultEventListeners, registerStubInstance, sendOutput, setComponentID, unregisterStubInstance
-
Field Details
-
ERROR_NOTIFICATION_ID
- See Also:
-
CREATE_BUTTON_LABEL
- See Also:
-
DATA_HANDLER_PARAM
- See Also:
-
DATA_HANDLER_PARAMETERS_PARAM
- See Also:
-
ITEM_MASTER_RENDERER_PARAM
- See Also:
-
ITEM_DETAIL_RENDERER_PARAM
- See Also:
-
CONTEXT_PARAM
- See Also:
-
SORTABLE_PARAM
- See Also:
-
EDITABLE_COLUMNS_PARAM
- See Also:
-
DEFAULT_ITEM_MASTER_RENDERER
- See Also:
-
DEFAULT_ITEM_DETAIL_RENDERER
- See Also:
-
SEARCH_RESULT
- See Also:
-
SPEL_REGEXP
-
EDITOR_SCLASS
- See Also:
-
ITEM_SCLASS
- See Also:
-
ITEM_MASTER_SCLASS
- See Also:
-
ITEM_MASTER_INNER_SCLASS
- See Also:
-
ITEM_DETAIL_SCLASS
- See Also:
-
ITEM_DETAIL_INNER_SCLASS
- See Also:
-
IN_SEARCH_RESULT_SCLASS
- See Also:
-
FILTER_SCLASS
- See Also:
-
CREATE_SCLASS
- See Also:
-
CREATE_ICON_SCLASS
- See Also:
-
SOCKET_OUT_CREATE_REQUEST
- See Also:
-
SOCKET_IN_CREATE_RESULT
- See Also:
-
SOCKET_OUT_UPDATE_REQUEST
- See Also:
-
SOCKET_IN_UPDATE_RESULT
- See Also:
-
ITEM_ATTRIBUTE
- See Also:
-
OPEN_ATTRIBUTE
- See Also:
-
EDITOR_DATA_KEY
- See Also:
-
EDITOR_MAX_SIZE
protected static final int EDITOR_MAX_SIZE- See Also:
-
LISTBOX_PRELOAD_SIZE_FACTOR
protected static final int LISTBOX_PRELOAD_SIZE_FACTOR- See Also:
-
-
Constructor Details
-
ConfigurableMultiReferenceEditor
public ConfigurableMultiReferenceEditor()
-
-
Method Details
-
render
public void render(org.zkoss.zk.ui.Component parent, com.hybris.cockpitng.editors.EditorContext<Collection<V>> editorContext, com.hybris.cockpitng.editors.EditorListener<Collection<V>> editorListener) - Specified by:
renderin interfacecom.hybris.cockpitng.editors.CockpitEditorRenderer<V>
-
resolveParentObject
-
resolveTypeCode
-
resolveContext
-
resolveSortable
protected boolean resolveSortable() -
resolveColumns
-
resolveEditableColumns
-
canCreate
-
resolveSearchResult
-
renderList
protected void renderList(org.zkoss.zk.ui.Component parent) -
renderItem
-
renderItemMaster
-
renderItemDetail
-
renderItemDetailHelper
protected void renderItemDetailHelper(org.zkoss.zk.ui.Component parent, AbstractEditorData editorData, boolean open) -
buildItemStyleClass
-
handleDropEvent
protected void handleDropEvent(org.zkoss.zk.ui.event.Event event) -
createListModel
-
createFilteredListModel
-
createDataHandler
-
createDataHandlerParameters
-
createItemMasterRenderer
-
createItemDetailRenderer
-
evaluate
-
createEvaluationContext
-
triggerCreateReference
public void triggerCreateReference()Description copied from interface:MultiReferenceEditorLogicTriggers the creation of a new item.- Specified by:
triggerCreateReferencein interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData>
-
createReference
-
triggerUpdateReference
Description copied from interface:MultiReferenceEditorLogicTriggers the update of an existing item.- Specified by:
triggerUpdateReferencein interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Parameters:
editorData- - the item data
-
updateReference
-
getWidgetInstanceManager
public com.hybris.cockpitng.engine.WidgetInstanceManager getWidgetInstanceManager()Description copied from interface:EditorLogicReturns the widget instance manager.- Specified by:
getWidgetInstanceManagerin interfaceEditorLogic<V>- Returns:
- the widget instance manager
-
isOpen
public boolean isOpen(org.zkoss.zk.ui.Component component) Description copied from interface:MultiReferenceEditorLogicReturns whether the given component is open. This can be used, for example, to check if an editor item is open.- Specified by:
isOpenin interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Parameters:
component- - the component- Returns:
trueif the component is open,falseotherwise
-
setOpen
public void setOpen(org.zkoss.zk.ui.Component component, boolean open) Description copied from interface:MultiReferenceEditorLogicChanges the open status of a component.- Specified by:
setOpenin interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Parameters:
component- - the componentopen- - the new open status
-
findEditor
public com.hybris.cockpitng.components.Editor findEditor(org.zkoss.zk.ui.Component component) Description copied from interface:MultiReferenceEditorLogicFinds the nearest editor component.- Specified by:
findEditorin interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Returns:
- the nearest editor component or
nullif it could not be found
-
findEditorItem
public org.zkoss.zk.ui.Component findEditorItem(org.zkoss.zk.ui.Component component) Description copied from interface:MultiReferenceEditorLogicFinds the nearest editor item component.- Specified by:
findEditorItemin interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Returns:
- the nearest editor item component or
nullif it could not be found
-
updateValue
Description copied from interface:MultiReferenceEditorLogicUpdates the value of the editor.- Specified by:
updateValuein interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Parameters:
value- - the value
-
updateAttributeValue
Description copied from interface:MultiReferenceEditorLogicUpdates the value of an item attribute.- Specified by:
updateAttributeValuein interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Parameters:
data- - the item dataattributeName- - the attribute nameattributeValue- - the attribute value
-
getEditorContext
Description copied from interface:EditorLogicReturns the editor context.- Specified by:
getEditorContextin interfaceEditorLogic<V>- Returns:
- the editor context
-
setEditorContext
protected void setEditorContext(com.hybris.cockpitng.editors.EditorContext<Collection<V>> editorContext) -
getEditorListener
Description copied from interface:EditorLogicReturns the editor listener.- Specified by:
getEditorListenerin interfaceEditorLogic<V>- Returns:
- the editor listener
-
setEditorListener
protected void setEditorListener(com.hybris.cockpitng.editors.EditorListener<Collection<V>> editorListener) -
getParentObject
-
setParentObject
-
getParentTypeCode
-
setParentTypeCode
-
getContext
Description copied from interface:MultiReferenceEditorLogicReturns the editor context.- Specified by:
getContextin interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Returns:
- the editor context
-
setContext
-
isSortable
public boolean isSortable()Description copied from interface:MultiReferenceEditorLogicReturns whether the editor items can be sorted.- Specified by:
isSortablein interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Returns:
trueif the editor items can be sorted,falseotherwise
-
setSortable
protected void setSortable(boolean sortable) -
getColumns
Description copied from interface:MultiReferenceEditorLogicReturns the columns.- Specified by:
getColumnsin interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Returns:
- the columns
-
setColumns
-
getEditableColumns
Description copied from interface:MultiReferenceEditorLogicReturns the editable columns.- Specified by:
getEditableColumnsin interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Returns:
- the editable columns
-
setEditableColumns
-
getDataHandler
Description copied from interface:MultiReferenceEditorLogicReturns the data handler.- Specified by:
getDataHandlerin interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Returns:
- the data handler
-
setDataHandler
-
getListModel
Description copied from interface:MultiReferenceEditorLogicReturns the list model.- Specified by:
getListModelin interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Returns:
- the list model
-
setListModel
-
getItemMasterRenderer
Description copied from interface:MultiReferenceEditorLogicReturns the renderer for the item master section.- Specified by:
getItemMasterRendererin interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Returns:
- the renderer for the item master section
-
setItemMasterRenderer
-
getItemDetailRenderer
Description copied from interface:MultiReferenceEditorLogicReturns the renderer for the item detail section.- Specified by:
getItemDetailRendererin interfaceMultiReferenceEditorLogic<V,D extends AbstractEditorData> - Returns:
- the renderer for the item detail section
-
setItemDetailRenderer
-