Class AbstractDualListboxEditor<K>

    • 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 editor
      protected org.zkoss.zul.Listbox collectionAllItems
      List of presented available values used for rendering listbox, presented on the left side of component
      protected org.zkoss.zul.Listbox collectionAssignedItems
      List of presented assigned values, presented on the right side of component
      protected 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
    • 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)