Class AbstractDualListboxEditor<K>
java.lang.Object
de.hybris.platform.cockpit.components.duallistbox.AbstractDualListboxEditor<K>
- Direct Known Subclasses:
DefaultReferenceDualListboxEditor,DefaultSimpleDualListboxEditor
DualListbox editor, used in wizards It is possible to change behavior of every cell of the editor by extending this
editor and overriding related methods. For specific implementation go to:
DefaultReferenceDualListboxEditor
for editor with search type, DefaultSimpleDualListboxEditor for columns-
Field Summary
FieldsModifier and TypeFieldDescriptionList of assigned values, that list should be taken as a result returned by editorprotected org.zkoss.zul.ListboxList of presented available values used for rendering listbox, presented on the left side of componentprotected org.zkoss.zul.ListboxList of presented assigned values, presented on the right side of componentprotected SearchTextboxDivSearch field presented in editor.protected booleanflag for resolving number of assigned values true - there is only one possible result on assigned list, new assignment overwrites the old one false - new assignment is added to the list -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddToAssignedValuesList(Object obj, org.zkoss.zul.Listitem item) Method for assigning available values to assigned values list.protected org.zkoss.zul.ImageMethod creates the button for assigning valuesorg.zkoss.zk.ui.HtmlBasedComponentcreateComponentView(Map<String, ? extends Object> parameters) protected org.zkoss.zhtml.TableMethod for main presentation viewprotected org.zkoss.zk.ui.HtmlBasedComponentCreates left bottom area of the wizard.protected org.zkoss.zk.ui.HtmlBasedComponentArea used for presenting search boxprotected org.zkoss.zk.ui.HtmlBasedComponentUsed for presenting assign buttonprotected org.zkoss.zk.ui.HtmlBasedComponentOriginally it's just an empty div,but it might be override if you want to present something in that area.protected org.zkoss.zk.ui.HtmlBasedComponentCreates right bottom area of the wizard.protected org.zkoss.zk.ui.HtmlBasedComponentOriginally that area is empty,but might be usd for extending editor usability.protected org.zkoss.zul.ListitemRendererprotected org.zkoss.zul.Labelprotected org.zkoss.zul.ListitemRendererprotected org.zkoss.zul.Labelabstract org.zkoss.zk.ui.event.EventListenerlistener for search, based on the specific implementationprotected org.zkoss.zk.ui.event.EventListenerListener for removal action for each element at the assigned listprotected abstract StringGets proper label for being presented in search textbox input componentprotected TypeServiceprotected booleanprotected abstract voidparseParams(Map<String, ? extends Object> parameters) prepares input parametersprotected voidMethod prepares the list of available values and applies basic settingsprotected voidMethod prepares the list of assigned values and applies basic settingsprotected voidsetResultListData(org.zkoss.zul.Listbox collectionItems, List<K> resultList) Method sets new result list to the proper listbox list.voidsetSingleSelector(boolean singleSelector) protected abstract voidupdates collection based on proper implementation
-
Field Details
-
collectionAssignedItems
protected org.zkoss.zul.Listbox collectionAssignedItemsList of presented assigned values, presented on the right side of component -
assignedValuesList
List of assigned values, that list should be taken as a result returned by editor -
collectionAllItems
protected org.zkoss.zul.Listbox collectionAllItemsList of presented available values used for rendering listbox, presented on the left side of component -
singleSelector
protected boolean singleSelectorflag for resolving number of assigned values true - there is only one possible result on assigned list, new assignment overwrites the old one false - new assignment is added to the list -
inputComponentDiv
Search field presented in editor. Requires proper label presented inside the field as an argument in constructor.
-
-
Constructor Details
-
AbstractDualListboxEditor
-
-
Method Details
-
getSearchInfoBox
Gets proper label for being presented in search textbox input component -
updateCollectionAllItems
protected abstract void updateCollectionAllItems()updates collection based on proper implementation -
getOnUserSearchListener
public abstract org.zkoss.zk.ui.event.EventListener getOnUserSearchListener()listener for search, based on the specific implementation -
parseParams
prepares input parameters -
createComponentView
-
createInternalComponentView
protected org.zkoss.zhtml.Table createInternalComponentView()Method for main presentation view -
fillLeftBottomCell
protected org.zkoss.zk.ui.HtmlBasedComponent fillLeftBottomCell()Creates left bottom area of the wizard. Holds the listbox of available values, but might be override -
fillRightBottomCell
protected org.zkoss.zk.ui.HtmlBasedComponent fillRightBottomCell()Creates right bottom area of the wizard. Holds the list box of assigned values, but might be override if needed -
fillMidTopCell
protected org.zkoss.zk.ui.HtmlBasedComponent fillMidTopCell()Originally it's just an empty div,but it might be override if you want to present something in that area. -
fillMidBottomCell
protected org.zkoss.zk.ui.HtmlBasedComponent fillMidBottomCell()Used for presenting assign button -
fillRightTopCell
protected org.zkoss.zk.ui.HtmlBasedComponent fillRightTopCell()Originally that area is empty,but might be usd for extending editor usability. -
fillLeftTopCell
protected org.zkoss.zk.ui.HtmlBasedComponent fillLeftTopCell()Area used for presenting search box -
setResultListData
Method sets new result list to the proper listbox list. That result list is later used for rendering listbox. -
createAssignBtn
protected org.zkoss.zul.Image createAssignBtn()Method creates the button for assigning values -
addToAssignedValuesList
Method for assigning available values to assigned values list. Used for button and for drag&drop -
prepareCollectionAssignedItems
protected void prepareCollectionAssignedItems()Method prepares the list of assigned values and applies basic settings -
prepareCollectionAllItems
protected void prepareCollectionAllItems()Method prepares the list of available values and applies basic settings -
getRemoveButtonListener
protected org.zkoss.zk.ui.event.EventListener getRemoveButtonListener()Listener for removal action for each element at the assigned list -
getAvailableCollectionItemListRenderer
protected org.zkoss.zul.ListitemRenderer getAvailableCollectionItemListRenderer() -
getAssignedCollectionItemListRenderer
protected org.zkoss.zul.ListitemRenderer getAssignedCollectionItemListRenderer() -
getAvailableValuesLabel
protected org.zkoss.zul.Label getAvailableValuesLabel() -
getAssignedValuesLabel
protected org.zkoss.zul.Label getAssignedValuesLabel() -
getAssignedValuesList
- Returns:
- the assignedValuesList
-
getTypeService
-
isSingleSelector
protected boolean isSingleSelector() -
setSingleSelector
public void setSingleSelector(boolean singleSelector)
-