Class UnifiedUiWidgetController

java.lang.Object
org.zkoss.zk.ui.event.GenericEventListener
org.zkoss.zk.ui.util.GenericComposer<T>
org.zkoss.zk.ui.util.GenericAutowireComposer<T>
org.zkoss.zk.ui.util.GenericForwardComposer<org.zkoss.zk.ui.Component>
com.hybris.cockpitng.util.ViewAnnotationAwareComposer
com.hybris.cockpitng.util.DefaultWidgetController
de.hybris.platform.unifieduibackoffice.widgets.merchandising.UnifiedUiWidgetController
All Implemented Interfaces:
com.hybris.cockpitng.core.WidgetController, com.hybris.cockpitng.dnd.WidgetDragAndDropAware, com.hybris.cockpitng.engine.WidgetInstanceManagerAware, Serializable, org.zkoss.zk.ui.event.EventListener, org.zkoss.zk.ui.event.SerializableEventListener, org.zkoss.zk.ui.util.ComponentActivationListener, org.zkoss.zk.ui.util.ComponentCloneListener, org.zkoss.zk.ui.util.Composer<org.zkoss.zk.ui.Component>, org.zkoss.zk.ui.util.ComposerExt<org.zkoss.zk.ui.Component>
Direct Known Subclasses:
AncillaryProductListController, BucketListController, ConditionListController, CreateOrEditConditionController, CreateOrEditDynamicPricingConditionController, CreateOrEditModificationConditionController, DynamicPricingListController, MarketBucketListController, MarketListController, ModificationListController

public class UnifiedUiWidgetController extends com.hybris.cockpitng.util.DefaultWidgetController
This controller will provide necessary dynamic component creation logic
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
     
    protected static final String
     

    Fields inherited from class org.zkoss.zk.ui.util.GenericAutowireComposer

    _separator, application, applicationScope, arg, componentScope, desktop, desktopScope, execution, page, pageScope, param, requestScope, self, session, sessionScope, spaceOwner, spaceScope

    Fields inherited from class org.zkoss.zk.ui.util.GenericComposer

    _applied
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.zkoss.zul.Button
    createButton(String labelKey)
    This method will create Button object
    protected org.zkoss.zul.Button
    createButton(String labelKey, String sclass)
    This method will create Button object
    protected org.zkoss.zul.Cell
    createCell(String cellId, String sclass)
    This method will create Cell object
    protected org.zkoss.zul.Column
    createColumn(String labelKey)
    This method will create Column object
    protected org.zkoss.zul.Combobox
    createCombobox(String name, org.zkoss.zul.ListModelList<ComboBoxData> list, boolean readOnly)
    This method will create Combobox object
    protected ComboBoxData
    createComboBoxData(String value, String labelKey)
    This method will create ComboBoxData object
    protected org.zkoss.zul.Datebox
    createDateBox(String name, String dateFormat)
    This method will create Datebox object
    protected org.zkoss.zul.Div
    createDiv(String sclass)
     
    protected org.zkoss.zul.Doublebox
    This method will create Doublebox object
    protected com.hybris.cockpitng.components.Editor
    createEditor(String type, String attribute)
    This method will create Editor object
    protected org.zkoss.zul.Grid
    createGrid(String gridId, String sclass)
    This method will create Grid object and append Rows object to the grid
    protected org.zkoss.zul.Intbox
    This method will create Intbox object
    protected org.zkoss.zul.Label
    createLabel(String labelKey, String sclass)
    This method will create Label object
    protected org.zkoss.zul.Textbox
    This method will create Textbox object
    protected String
    This method create comma separated string from string list
    getNameValueMap(org.zkoss.zk.ui.Component child)
    this method will extract name and value from the Component
    protected boolean
    mseDistributionRuleCheck(org.zkoss.zul.Checkbox checkbox, Boolean isMse)
    Mse distribution rule check boolean.
    protected Date
    This method will parse string date in date object
    protected void
    populateCombobox(org.zkoss.zul.Combobox comboBox, org.zkoss.zul.ListModelList<ComboBoxData> list, Integer selectedIndex)
    This method will populate values in the combo box and select index of the combobox if passed
    protected void
    selectComboBoxItem(org.zkoss.zul.Combobox combobox, String value)
    This method will select the value from the combo box based on value
    protected boolean
    tmcDistributionRuleCheck(org.zkoss.zul.Checkbox checkbox, Boolean isTmc)
    Tmc distribution rule check boolean.
    protected void
    updateHtmlBasedComponent(org.zkoss.zk.ui.HtmlBasedComponent htmlBasedComponent, String componentId, String sclass, boolean defaultValue, String className)
    This method will set values to component and also will update default value based on defaultValue flag

    Methods inherited from class com.hybris.cockpitng.util.DefaultWidgetController

    doAfterCompose, doBeforeCompose, doBeforeComposeChildren, executeOperation, getDragAndDropStrategy, getLabel, getLabel, getModel, getValue, getWidgetDragAndDropStrategyRepository, getWidgetInstanceManager, getWidgetRoot, getWidgetSettings, getWidgetslot, getWidgetTitle, getWidgetUtils, initDragAndDropAwareness, initialize, initWidgetSetting, initWidgetSetting, initWidgetSetting, initWidgetSetting, initWidgetSetting, invokeListenerMethod, onSocketInput, preInitialize, sendOutput, sendOutputAfterOperation, sendOutputAfterOperation, sendOutputAfterOperation, setValue, setWidgetInstanceManager, setWidgetTitle

    Methods inherited from class com.hybris.cockpitng.util.ViewAnnotationAwareComposer

    scanEventListeners

    Methods inherited from class org.zkoss.zk.ui.util.GenericAutowireComposer

    alert, didActivate, getPage, willClone, willPassivate

    Methods inherited from class org.zkoss.zk.ui.util.GenericComposer

    doCatch, doFinally

    Methods inherited from class org.zkoss.zk.ui.event.GenericEventListener

    bindComponent, getController, onEvent, unbindComponent

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • UnifiedUiWidgetController

      public UnifiedUiWidgetController()
  • Method Details

    • createGrid

      protected org.zkoss.zul.Grid createGrid(String gridId, String sclass)
      This method will create Grid object and append Rows object to the grid
      Parameters:
      gridId - the grid Id
      sclass - the sclass
      Returns:
      the grid
    • updateHtmlBasedComponent

      protected void updateHtmlBasedComponent(org.zkoss.zk.ui.HtmlBasedComponent htmlBasedComponent, String componentId, String sclass, boolean defaultValue, String className)
      This method will set values to component and also will update default value based on defaultValue flag
      Parameters:
      htmlBasedComponent - the html based component
      componentId - the component id
      sclass - the sclass
      defaultValue - the default value true or false flag. if true then default value will be set
      className - the simple class name
    • createCell

      protected org.zkoss.zul.Cell createCell(String cellId, String sclass)
      This method will create Cell object
      Parameters:
      cellId -
      sclass -
      Returns:
    • createLabel

      protected org.zkoss.zul.Label createLabel(String labelKey, String sclass)
      This method will create Label object
      Parameters:
      labelKey - the labelKey from labels properties
      Returns:
      the Label
    • createTextBox

      protected org.zkoss.zul.Textbox createTextBox(String name)
      This method will create Textbox object
      Parameters:
      name - the name
      Returns:
      the Textbox
    • createDoubleBox

      protected org.zkoss.zul.Doublebox createDoubleBox(String name)
      This method will create Doublebox object
      Parameters:
      name - the name
      Returns:
      the Doublebox
    • createDiv

      protected org.zkoss.zul.Div createDiv(String sclass)
    • createButton

      protected org.zkoss.zul.Button createButton(String labelKey, String sclass)
      This method will create Button object
      Parameters:
      labelKey - the labelKey from labels properties
      Returns:
      the Button
    • createEditor

      protected com.hybris.cockpitng.components.Editor createEditor(String type, String attribute)
      This method will create Editor object
      Parameters:
      type - the item type
      attribute - the attribute
      Returns:
      the Editor
    • createComboBoxData

      protected ComboBoxData createComboBoxData(String value, String labelKey)
      This method will create ComboBoxData object
      Parameters:
      value - the value
      labelKey - the label key
      Returns:
    • createCombobox

      protected org.zkoss.zul.Combobox createCombobox(String name, org.zkoss.zul.ListModelList<ComboBoxData> list, boolean readOnly)
      This method will create Combobox object
      Parameters:
      name - the
      list - the list of ComboBoxData
      readOnly - the attribute which can decide either Combobox should be read only or not
      Returns:
      the Combobox
    • createDateBox

      protected org.zkoss.zul.Datebox createDateBox(String name, String dateFormat)
      This method will create Datebox object
      Parameters:
      name - the name
      Returns:
      the Datebox
    • createIntBox

      protected org.zkoss.zul.Intbox createIntBox(String name)
      This method will create Intbox object
      Parameters:
      name - the name
      Returns:
      the Intbox
    • createColumn

      protected org.zkoss.zul.Column createColumn(String labelKey)
      This method will create Column object
      Parameters:
      labelKey - the labelKey from labels properties
      Returns:
      the Column
    • createButton

      protected org.zkoss.zul.Button createButton(String labelKey)
      This method will create Button object
      Parameters:
      labelKey - the labelKey from labels properties
      Returns:
      the Button
    • getNameValueMap

      protected AbstractMap.SimpleEntry<String,Object> getNameValueMap(org.zkoss.zk.ui.Component child)
      this method will extract name and value from the Component
      Parameters:
      child - the component from which we need to extract values
      Returns:
      the SimpleEntry Map
    • selectComboBoxItem

      protected void selectComboBoxItem(org.zkoss.zul.Combobox combobox, String value)
      This method will select the value from the combo box based on value
      Parameters:
      combobox - the combobox
      value - the value
    • getCommaSeparateString

      protected String getCommaSeparateString(List<String> stringList)
      This method create comma separated string from string list
      Parameters:
      stringList -
      Returns:
    • parseDateInStringToDate

      protected Date parseDateInStringToDate(String dateInString)
      This method will parse string date in date object
      Parameters:
      dateInString - the dateInString
      Returns:
      the date
    • populateCombobox

      protected void populateCombobox(org.zkoss.zul.Combobox comboBox, org.zkoss.zul.ListModelList<ComboBoxData> list, Integer selectedIndex)
      This method will populate values in the combo box and select index of the combobox if passed
      Parameters:
      comboBox -
      list -
      selectedIndex -
    • tmcDistributionRuleCheck

      protected boolean tmcDistributionRuleCheck(org.zkoss.zul.Checkbox checkbox, Boolean isTmc)
      Tmc distribution rule check boolean.
      Parameters:
      checkbox - the checkbox
      isTmc - the is tmc
      Returns:
      the boolean
    • mseDistributionRuleCheck

      protected boolean mseDistributionRuleCheck(org.zkoss.zul.Checkbox checkbox, Boolean isMse)
      Mse distribution rule check boolean.
      Parameters:
      checkbox - the checkbox
      isMse - the is mse
      Returns:
      the boolean