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
FieldsFields 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, spaceScopeFields inherited from class org.zkoss.zk.ui.util.GenericComposer
_applied -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.zkoss.zul.ButtoncreateButton(String labelKey) This method will create Button objectprotected org.zkoss.zul.ButtoncreateButton(String labelKey, String sclass) This method will create Button objectprotected org.zkoss.zul.CellcreateCell(String cellId, String sclass) This method will create Cell objectprotected org.zkoss.zul.ColumncreateColumn(String labelKey) This method will create Column objectprotected org.zkoss.zul.ComboboxcreateCombobox(String name, org.zkoss.zul.ListModelList<ComboBoxData> list, boolean readOnly) This method will create Combobox objectprotected ComboBoxDatacreateComboBoxData(String value, String labelKey) This method will create ComboBoxData objectprotected org.zkoss.zul.DateboxcreateDateBox(String name, String dateFormat) This method will create Datebox objectprotected org.zkoss.zul.Divprotected org.zkoss.zul.DoubleboxcreateDoubleBox(String name) This method will create Doublebox objectprotected com.hybris.cockpitng.components.EditorcreateEditor(String type, String attribute) This method will create Editor objectprotected org.zkoss.zul.GridcreateGrid(String gridId, String sclass) This method will create Grid object and append Rows object to the gridprotected org.zkoss.zul.IntboxcreateIntBox(String name) This method will create Intbox objectprotected org.zkoss.zul.LabelcreateLabel(String labelKey, String sclass) This method will create Label objectprotected org.zkoss.zul.TextboxcreateTextBox(String name) This method will create Textbox objectprotected StringgetCommaSeparateString(List<String> stringList) This method create comma separated string from string listprotected AbstractMap.SimpleEntry<String,Object> getNameValueMap(org.zkoss.zk.ui.Component child) this method will extract name and value from the Componentprotected booleanmseDistributionRuleCheck(org.zkoss.zul.Checkbox checkbox, Boolean isMse) Mse distribution rule check boolean.protected DateparseDateInStringToDate(String dateInString) This method will parse string date in date objectprotected voidpopulateCombobox(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 passedprotected voidselectComboBoxItem(org.zkoss.zul.Combobox combobox, String value) This method will select the value from the combo box based on valueprotected booleantmcDistributionRuleCheck(org.zkoss.zul.Checkbox checkbox, Boolean isTmc) Tmc distribution rule check boolean.protected voidupdateHtmlBasedComponent(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 flagMethods 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, setWidgetTitleMethods inherited from class com.hybris.cockpitng.util.ViewAnnotationAwareComposer
scanEventListenersMethods inherited from class org.zkoss.zk.ui.util.GenericAutowireComposer
alert, didActivate, getPage, willClone, willPassivateMethods inherited from class org.zkoss.zk.ui.util.GenericComposer
doCatch, doFinallyMethods inherited from class org.zkoss.zk.ui.event.GenericEventListener
bindComponent, getController, onEvent, unbindComponent
-
Field Details
-
JUST_MESSAGE
- See Also:
-
COMMA_SEPARATOR
- See Also:
-
-
Constructor Details
-
UnifiedUiWidgetController
public UnifiedUiWidgetController()
-
-
Method Details
-
createGrid
This method will create Grid object and append Rows object to the grid- Parameters:
gridId- the grid Idsclass- 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 componentcomponentId- the component idsclass- the sclassdefaultValue- the default value true or false flag. if true then default value will be setclassName- the simple class name
-
createCell
This method will create Cell object- Parameters:
cellId-sclass-- Returns:
-
createLabel
This method will create Label object- Parameters:
labelKey- the labelKey from labels properties- Returns:
- the Label
-
createTextBox
This method will create Textbox object- Parameters:
name- the name- Returns:
- the Textbox
-
createDoubleBox
This method will create Doublebox object- Parameters:
name- the name- Returns:
- the Doublebox
-
createDiv
-
createButton
This method will create Button object- Parameters:
labelKey- the labelKey from labels properties- Returns:
- the Button
-
createEditor
This method will create Editor object- Parameters:
type- the item typeattribute- the attribute- Returns:
- the Editor
-
createComboBoxData
This method will create ComboBoxData object- Parameters:
value- the valuelabelKey- 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- thelist- the list of ComboBoxDatareadOnly- the attribute which can decide either Combobox should be read only or not- Returns:
- the Combobox
-
createDateBox
This method will create Datebox object- Parameters:
name- the name- Returns:
- the Datebox
-
createIntBox
This method will create Intbox object- Parameters:
name- the name- Returns:
- the Intbox
-
createColumn
This method will create Column object- Parameters:
labelKey- the labelKey from labels properties- Returns:
- the Column
-
createButton
This method will create Button object- Parameters:
labelKey- the labelKey from labels properties- Returns:
- the Button
-
getNameValueMap
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
This method will select the value from the combo box based on value- Parameters:
combobox- the comboboxvalue- the value
-
getCommaSeparateString
This method create comma separated string from string list- Parameters:
stringList-- Returns:
-
parseDateInStringToDate
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
Tmc distribution rule check boolean.- Parameters:
checkbox- the checkboxisTmc- the is tmc- Returns:
- the boolean
-
mseDistributionRuleCheck
Mse distribution rule check boolean.- Parameters:
checkbox- the checkboxisMse- the is mse- Returns:
- the boolean
-