java.lang.Object
org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zul.Div
de.hybris.platform.cockpit.model.referenceeditor.AbstractReferenceSelector
de.hybris.platform.cockpit.model.referenceeditor.impl.ReferenceSelector
All Implemented Interfaces:
UIViewComponent, UIReferenceSelector, DesktopRemovalAwareComponent, Serializable, Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.sys.ComponentCtrl
Direct Known Subclasses:
MediaReferenceSelector, ReferenceSelector4Collection

public class ReferenceSelector extends AbstractReferenceSelector implements DesktopRemovalAwareComponent
Represents implementation of reference selector component
See Also:
  • Field Details

    • CENTER

      protected static final String CENTER
      See Also:
    • _100PERCENT

      protected static final String _100PERCENT
      See Also:
    • _99PERCENT

      protected static final String _99PERCENT
      See Also:
    • LEFT_BRACKET

      protected static final String LEFT_BRACKET
      See Also:
    • RIGHT_BRACKET

      protected static final String RIGHT_BRACKET
      See Also:
    • ELLIPSIS

      protected static final String ELLIPSIS
      See Also:
    • VERTICAL

      protected static final String VERTICAL
      See Also:
    • COMMA

      protected static final String COMMA
      See Also:
    • MAX_ROWS

      protected static final int MAX_ROWS
      See Also:
    • REFERENCE_EDITOR_BTN_SCLASS

      protected static final String REFERENCE_EDITOR_BTN_SCLASS
      See Also:
    • LIST_VIEW_SELECTOR_SCLASS

      protected static final String LIST_VIEW_SELECTOR_SCLASS
      See Also:
    • ENTER_CHAR

      protected static final int ENTER_CHAR
      See Also:
    • ESC_CHAR

      protected static final int ESC_CHAR
      See Also:
    • CLOSE_BTN_IMG

      protected static final String CLOSE_BTN_IMG
      See Also:
    • EMPTY_MESSAGE

      protected static final String EMPTY_MESSAGE
      See Also:
    • WIDTH

      protected static final String WIDTH
      See Also:
    • HEIGHT

      protected static final String HEIGHT
      See Also:
    • ADV_QUERY_BTN_IMG

      protected static final String ADV_QUERY_BTN_IMG
      See Also:
    • component

      protected transient org.zkoss.zul.Bandbox component
    • labelContainer

      protected transient org.zkoss.zhtml.Table labelContainer
    • popupContainer

      protected transient org.zkoss.zul.Bandpopup popupContainer
    • container

      protected transient org.zkoss.zul.Vbox container
    • notConfirmedItems

      protected transient org.zkoss.zul.Listbox notConfirmedItems
    • autoCompleteList

      protected transient org.zkoss.zul.Listbox autoCompleteList
    • temporaryItemsList

      protected transient org.zkoss.zul.Listbox temporaryItemsList
    • autoCompleteInputField

      protected transient org.zkoss.zul.Bandbox autoCompleteInputField
    • autoCompletePopup

      protected transient org.zkoss.zul.Bandpopup autoCompletePopup
    • addButton

      protected transient org.zkoss.zul.Toolbarbutton addButton
    • listView

      protected transient UIListView listView
    • advancedSearchComponent

      protected transient UIAdvancedSearchView advancedSearchComponent
    • listViewController

      protected transient ComponentController listViewController
    • advancedSearchController

      protected transient ComponentController advancedSearchController
    • ON_CLICK_EVENT

      protected static final String ON_CLICK_EVENT
      See Also:
    • REFERENECE_SELECTOR_SCLASS

      protected static final String REFERENECE_SELECTOR_SCLASS
      See Also:
    • REFERENECE_SELECTOR_CMP_SCLASS

      protected static final String REFERENECE_SELECTOR_CMP_SCLASS
      See Also:
    • REFERENECE_SELECTOR_TABLE_LABEL_SCLASS

      protected static final String REFERENECE_SELECTOR_TABLE_LABEL_SCLASS
      See Also:
    • REFERENECE_SELECTOR_TABLE_LABEL_FIRSTCELL

      protected static final String REFERENECE_SELECTOR_TABLE_LABEL_FIRSTCELL
      See Also:
    • REFERENECE_SELECTOR_TABLE_LABEL_SECONDCELL

      protected static final String REFERENECE_SELECTOR_TABLE_LABEL_SECONDCELL
      See Also:
    • REFERENECE_SELECTOR_TABLE_LABEL_INFOLABEL

      protected static final String REFERENECE_SELECTOR_TABLE_LABEL_INFOLABEL
      See Also:
    • REFERENECE_SELECTOR_CMP_POPUP_SCLASS

      protected static final String REFERENECE_SELECTOR_CMP_POPUP_SCLASS
      See Also:
    • REFERENECE_SELECTOR_NOT_CONFIRMED_SCLASS

      protected static final String REFERENECE_SELECTOR_NOT_CONFIRMED_SCLASS
      See Also:
    • REFERENECE_SELECTOR_LISTBOX_ODD_ROWS

      protected static final String REFERENECE_SELECTOR_LISTBOX_ODD_ROWS
      See Also:
    • REFERENECE_SELECTOR_NOT_CONFIRMED_LABEL

      protected static final String REFERENECE_SELECTOR_NOT_CONFIRMED_LABEL
      See Also:
    • REFERENECE_SELECTOR_NOT_CONFIRMED_CELLLABEL

      protected static final String REFERENECE_SELECTOR_NOT_CONFIRMED_CELLLABEL
      See Also:
    • REFERENECE_SELECTOR_AUTOCOMPLETE

      protected static final String REFERENECE_SELECTOR_AUTOCOMPLETE
      See Also:
    • REFERENECE_SELECTOR_AUTOCOMPLETE_POPUP

      protected static final String REFERENECE_SELECTOR_AUTOCOMPLETE_POPUP
      See Also:
    • REFERENECE_SELECTOR_AUTOCOMPLETE_LIST

      protected static final String REFERENECE_SELECTOR_AUTOCOMPLETE_LIST
      See Also:
    • REFERENECE_SELECTOR_AUTOCOMPLETE_CELLITEM

      protected static final String REFERENECE_SELECTOR_AUTOCOMPLETE_CELLITEM
      See Also:
    • REFERENECE_SELECTOR_TEMPORARY_LIST

      protected static final String REFERENECE_SELECTOR_TEMPORARY_LIST
      See Also:
    • REFERENECE_SELECTOR_TEMPORARY_LIST_CELLITEM

      protected static final String REFERENECE_SELECTOR_TEMPORARY_LIST_CELLITEM
      See Also:
    • model

      protected ReferenceSelectorModel model
    • SHOW_TEMPORARY_SELECTED

      protected static final boolean SHOW_TEMPORARY_SELECTED
      See Also:
    • initialized

      protected boolean initialized
    • disabled

      protected boolean disabled
    • allowcreate

      protected Boolean allowcreate
  • Constructor Details

    • ReferenceSelector

      public ReferenceSelector()
  • Method Details

    • setFocus

      public void setFocus(boolean focus)
      Overrides:
      setFocus in class org.zkoss.zk.ui.HtmlBasedComponent
    • isAllowcreate

      public Boolean isAllowcreate()
      Gets allowcreate flag
      Returns:
      allowcreate
    • setAllowcreate

      public void setAllowcreate(Boolean allowcreate)
      Sets allowcreate flag
      Parameters:
      allowcreate -
    • setCreateContext

      public void setCreateContext(CreateContext createContext)
    • update

      public boolean update()
      Description copied from interface: UIViewComponent
      Updates this view component completely.
      Specified by:
      update in interface UIViewComponent
      Returns:
      true if update was successful, false otherwise
    • updateAutoCompleteItemList

      protected void updateAutoCompleteItemList()
    • updateNotConfirmedItemList

      protected void updateNotConfirmedItemList()
    • updateTemporaryItemList

      protected void updateTemporaryItemList()
    • showReferenceSelectorModalDialog

      protected void showReferenceSelectorModalDialog()
    • showComponentPopup

      public void showComponentPopup()
      Specified by:
      showComponentPopup in interface UIReferenceSelector
    • closeComponentPopup

      public void closeComponentPopup()
    • closeReferenceSelectorModalDialog

      public void closeReferenceSelectorModalDialog()
    • showAutoCompletePopup

      public void showAutoCompletePopup()
      Specified by:
      showAutoCompletePopup in interface UIReferenceSelector
    • updateTemporaryItems

      public void updateTemporaryItems()
      Specified by:
      updateTemporaryItems in interface UIReferenceSelector
    • updateMode

      public void updateMode()
      Specified by:
      updateMode in interface UIReferenceSelector
    • updateAutoCompleteResult

      public void updateAutoCompleteResult()
      Specified by:
      updateAutoCompleteResult in interface UIReferenceSelector
    • updateSearchResult

      public void updateSearchResult()
      Specified by:
      updateSearchResult in interface UIReferenceSelector
    • loadListView

      protected UIListView loadListView()
    • initialize

      public boolean initialize()
      Description copied from interface: UIViewComponent
      Initializes this view component.

      Note: Should not be called during object creation i.e. from constructor.

      Specified by:
      initialize in interface UIViewComponent
      Returns:
      true if initialize was successful, false otherwise
    • loadViewComponents

      public void loadViewComponents()
    • loadAdvancedSearchView

      protected UIAdvancedSearchView loadAdvancedSearchView()
    • setAdvancedSearchComponent

      public void setAdvancedSearchComponent(UIAdvancedSearchView searchComponent)
      Specified by:
      setAdvancedSearchComponent in interface UIReferenceSelector
    • computeLabel

      protected String computeLabel()
    • updateItemsNotConfirmed

      public void updateItemsNotConfirmed()
      Specified by:
      updateItemsNotConfirmed in interface UIReferenceSelector
    • updateItems

      public void updateItems()
      Specified by:
      updateItems in interface UIReferenceSelector
    • setModel

      public void setModel(ReferenceSelectorModel model)
      Specified by:
      setModel in interface UIReferenceSelector
    • getModel

      public ReferenceSelectorModel getModel()
      Specified by:
      getModel in interface UIReferenceSelector
    • reset

      public void reset()
    • focusElement

      protected void focusElement(org.zkoss.zk.ui.HtmlBasedComponent focusableComponent)
    • isSelected

      protected boolean isSelected(List<? extends Object> elements, Object candidate)
    • clearAutoCompleteInputText

      protected void clearAutoCompleteInputText()
    • selectOrDeselectAutoCompleteItems

      protected void selectOrDeselectAutoCompleteItems(int index)
    • uncheckAllListItem

      protected void uncheckAllListItem(org.zkoss.zul.Listbox listbox)
    • selectOrDeselectTemporaryItems

      protected void selectOrDeselectTemporaryItems(int index)
    • selectOrDeselectItems

      protected void selectOrDeselectItems(int index)
    • createLabelRepresentation

      protected org.zkoss.zhtml.Tr createLabelRepresentation()
    • doItemActivated

      public void doItemActivated()
    • desktopRemoved

      public void desktopRemoved(org.zkoss.zk.ui.Desktop desktop)
      Specified by:
      desktopRemoved in interface DesktopRemovalAwareComponent
    • detach

      public void detach()
      Specified by:
      detach in interface org.zkoss.zk.ui.Component
      Overrides:
      detach in class org.zkoss.zk.ui.AbstractComponent
    • setParent

      public void setParent(org.zkoss.zk.ui.Component parent)
      Specified by:
      setParent in interface org.zkoss.zk.ui.Component
      Overrides:
      setParent in class org.zkoss.zk.ui.AbstractComponent
    • updateRootTypeChanged

      public void updateRootTypeChanged()
      Specified by:
      updateRootTypeChanged in interface UIReferenceSelector
    • updateRootSearchTypeChanged

      public void updateRootSearchTypeChanged()
      Specified by:
      updateRootSearchTypeChanged in interface UIReferenceSelector
    • autoCompleteListItemRenderer

      protected org.zkoss.zul.ListitemRenderer autoCompleteListItemRenderer()
    • notConfirmedListItemrenderer

      protected org.zkoss.zul.ListitemRenderer notConfirmedListItemrenderer()
    • wrappIntoTable

      protected org.zkoss.zhtml.Table wrappIntoTable(org.zkoss.zk.ui.Component firstCellContent, org.zkoss.zk.ui.Component secondCellConent, String firstCellStyle, String secondCellStyle)
    • setInitString

      public void setInitString(String initStr)
    • setFocus

      public void setFocus()
      Specified by:
      setFocus in interface UIReferenceSelector
    • performOnOkAction

      protected void performOnOkAction()
    • addEventSelectorListener

      public void addEventSelectorListener(String event, org.zkoss.zk.ui.event.EventListener listener)
    • isDisabled

      public boolean isDisabled()
    • setDisabled

      public void setDisabled(boolean disabled)
    • getParameters

      public Map<String,? extends Object> getParameters()
    • setParameters

      public void setParameters(Map<String,? extends Object> parameters)
    • getDefaultAutocompleteTimeout

      public int getDefaultAutocompleteTimeout()