Class AbstractDualListboxEditor<K>
- java.lang.Object
-
- de.hybris.platform.cockpit.components.duallistbox.AbstractDualListboxEditor<K>
-
- Direct Known Subclasses:
DefaultReferenceDualListboxEditor
,DefaultSimpleDualListboxEditor
public abstract class AbstractDualListboxEditor<K> extends java.lang.Object
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
Fields Modifier and Type Field Description protected java.util.List<K>
assignedValuesList
List of assigned values, that list should be taken as a result returned by editorprotected org.zkoss.zul.Listbox
collectionAllItems
List of presented available values used for rendering listbox, presented on the left side of componentprotected org.zkoss.zul.Listbox
collectionAssignedItems
List of presented assigned values, presented on the right side of componentprotected SearchTextboxDiv
inputComponentDiv
Search field presented in editor.protected boolean
singleSelector
flag 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 Constructor Description AbstractDualListboxEditor(java.util.List<K> assignedValuesList)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addToAssignedValuesList(java.lang.Object obj, org.zkoss.zul.Listitem item)
Method for assigning available values to assigned values list.protected org.zkoss.zul.Image
createAssignBtn()
Method creates the button for assigning valuesorg.zkoss.zk.ui.HtmlBasedComponent
createComponentView(java.util.Map<java.lang.String,? extends java.lang.Object> parameters)
protected org.zkoss.zhtml.Table
createInternalComponentView()
Method for main presentation viewprotected org.zkoss.zk.ui.HtmlBasedComponent
fillLeftBottomCell()
Creates left bottom area of the wizard.protected org.zkoss.zk.ui.HtmlBasedComponent
fillLeftTopCell()
Area used for presenting search boxprotected org.zkoss.zk.ui.HtmlBasedComponent
fillMidBottomCell()
Used for presenting assign buttonprotected 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.protected org.zkoss.zk.ui.HtmlBasedComponent
fillRightBottomCell()
Creates right bottom area of the wizard.protected org.zkoss.zk.ui.HtmlBasedComponent
fillRightTopCell()
Originally that area is empty,but might be usd for extending editor usability.protected org.zkoss.zul.ListitemRenderer
getAssignedCollectionItemListRenderer()
protected org.zkoss.zul.Label
getAssignedValuesLabel()
java.util.List<K>
getAssignedValuesList()
protected org.zkoss.zul.ListitemRenderer
getAvailableCollectionItemListRenderer()
protected org.zkoss.zul.Label
getAvailableValuesLabel()
abstract org.zkoss.zk.ui.event.EventListener
getOnUserSearchListener()
listener for search, based on the specific implementationprotected org.zkoss.zk.ui.event.EventListener
getRemoveButtonListener()
Listener for removal action for each element at the assigned listprotected abstract java.lang.String
getSearchInfoBox()
Gets proper label for being presented in search textbox input componentprotected TypeService
getTypeService()
protected boolean
isSingleSelector()
protected abstract void
parseParams(java.util.Map<java.lang.String,? extends java.lang.Object> parameters)
prepares input parametersprotected void
prepareCollectionAllItems()
Method prepares the list of available values and applies basic settingsprotected void
prepareCollectionAssignedItems()
Method prepares the list of assigned values and applies basic settingsprotected void
setResultListData(org.zkoss.zul.Listbox collectionItems, java.util.List<K> resultList)
Method sets new result list to the proper listbox list.void
setSingleSelector(boolean singleSelector)
protected abstract void
updateCollectionAllItems()
updates collection based on proper implementation
-
-
-
Field Detail
-
collectionAssignedItems
protected org.zkoss.zul.Listbox collectionAssignedItems
List of presented assigned values, presented on the right side of component
-
assignedValuesList
protected java.util.List<K> assignedValuesList
List of assigned values, that list should be taken as a result returned by editor
-
collectionAllItems
protected org.zkoss.zul.Listbox collectionAllItems
List of presented available values used for rendering listbox, presented on the left side of component
-
singleSelector
protected boolean singleSelector
flag 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
protected SearchTextboxDiv inputComponentDiv
Search field presented in editor. Requires proper label presented inside the field as an argument in constructor.
-
-
Constructor Detail
-
AbstractDualListboxEditor
public AbstractDualListboxEditor(java.util.List<K> assignedValuesList)
-
-
Method Detail
-
getSearchInfoBox
protected abstract java.lang.String 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
protected abstract void parseParams(java.util.Map<java.lang.String,? extends java.lang.Object> parameters)
prepares input parameters
-
createComponentView
public org.zkoss.zk.ui.HtmlBasedComponent createComponentView(java.util.Map<java.lang.String,? extends java.lang.Object> parameters)
-
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
protected void setResultListData(org.zkoss.zul.Listbox collectionItems, java.util.List<K> resultList)
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
protected void addToAssignedValuesList(java.lang.Object obj, org.zkoss.zul.Listitem item)
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
public java.util.List<K> getAssignedValuesList()
- Returns:
- the assignedValuesList
-
getTypeService
protected TypeService getTypeService()
-
isSingleSelector
protected boolean isSingleSelector()
-
setSingleSelector
public void setSingleSelector(boolean singleSelector)
-
-