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 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 Details

    • collectionAssignedItems

      protected org.zkoss.zul.Listbox collectionAssignedItems
      List of presented assigned values, presented on the right side of component
    • assignedValuesList

      protected 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 Details

    • AbstractDualListboxEditor

      public AbstractDualListboxEditor(List<K> assignedValuesList)
  • Method Details

    • getSearchInfoBox

      protected abstract 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(Map<String,? extends Object> parameters)
      prepares input parameters
    • createComponentView

      public org.zkoss.zk.ui.HtmlBasedComponent createComponentView(Map<String,? extends 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, 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(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 List<K> getAssignedValuesList()
      Returns:
      the assignedValuesList
    • getTypeService

      protected TypeService getTypeService()
    • isSingleSelector

      protected boolean isSingleSelector()
    • setSingleSelector

      public void setSingleSelector(boolean singleSelector)