Class ModifyInventoryForFlightRenderer
java.lang.Object
com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer<org.zkoss.zk.ui.Component,com.hybris.cockpitng.config.jaxb.wizard.ViewType,Map<String,String>>
com.hybris.cockpitng.widgets.configurableflow.renderer.DefaultCustomViewRenderer
de.hybris.platform.transportbackoffice.widgets.inventory.renderer.ModifyInventoryForFlightRenderer
- All Implemented Interfaces:
com.hybris.cockpitng.widgets.common.NotifyingWidgetComponentRenderer<org.zkoss.zk.ui.Component,,com.hybris.cockpitng.config.jaxb.wizard.ViewType, Map<String, String>> com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zk.ui.Component,,com.hybris.cockpitng.config.jaxb.wizard.ViewType, Map<String, String>> org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
public class ModifyInventoryForFlightRenderer
extends com.hybris.cockpitng.widgets.configurableflow.renderer.DefaultCustomViewRenderer
implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
This is responsible of rendering the layout of the Step2 of modify inventory for flight.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.hybris.cockpitng.components.EditorcreateEditor(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, String type, String defaultEditor, String property, String event) Method that create editor according to given parameterprotected voidcreateGridColumns(org.zkoss.zul.Grid modifyInventoryGrid, Boolean isSingleTransportOffering, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Creates grid columnsprotected org.zkoss.zul.GridcreateGridLayout(org.zkoss.zul.Div container, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Creates grid layoutprotected voidcreateGridRows(org.zkoss.zul.Grid modifyInventoryGrid, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, boolean isSingleTransportOffering) Creates grid rowsprotected org.zkoss.zk.ui.ComponentcreateLayout(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Creates grid layout.protected org.zkoss.zul.RowcreateRow(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, boolean isSingleTransportOffering, StockLevelModel stockLevelModel, String property) Method createsRowfor each stock level entry.protected com.hybris.cockpitng.labels.LabelServiceGets label service.protected booleanisStockLevelCodeValid(String stockLevelCode) Checks if the stockLevelCode is valid, checking it against the REGEX_ALPHANUMERIC.voidonEvent(org.zkoss.zk.ui.event.Event event) protected voidputInStockStatusEnumInContext(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Method fetches theInStockStatuslabel value and save into the context.voidrender(org.zkoss.zk.ui.Component parent, com.hybris.cockpitng.config.jaxb.wizard.ViewType customView, Map<String, String> parameters, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) voidsetLabelService(com.hybris.cockpitng.labels.LabelService labelService) Sets label service.Methods inherited from class com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer
addRendererListener, fireComponentRendered, fireComponentRendered, fireComponentRendered, removeRendererListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hybris.cockpitng.widgets.common.WidgetComponentRenderer
render
-
Constructor Details
-
ModifyInventoryForFlightRenderer
public ModifyInventoryForFlightRenderer()
-
-
Method Details
-
render
-
createLayout
protected org.zkoss.zk.ui.Component createLayout(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Creates grid layout.- Parameters:
widgetInstanceManager- the widget instance manager- Returns:
- the component
-
putInStockStatusEnumInContext
protected void putInStockStatusEnumInContext(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Method fetches theInStockStatuslabel value and save into the context.- Parameters:
widgetInstanceManager- the widget instance manager
-
createGridLayout
protected org.zkoss.zul.Grid createGridLayout(org.zkoss.zul.Div container, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Creates grid layout- Parameters:
container- the containerwidgetInstanceManager- the widget instance manager- Returns:
- the grid
-
createGridRows
protected void createGridRows(org.zkoss.zul.Grid modifyInventoryGrid, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, boolean isSingleTransportOffering) Creates grid rows- Parameters:
modifyInventoryGrid- the modify inventory gridwidgetInstanceManager- the widget instance managerisSingleTransportOffering- the is single transport offering
-
isStockLevelCodeValid
Checks if the stockLevelCode is valid, checking it against the REGEX_ALPHANUMERIC.- Parameters:
stockLevelCode- as the stock level code- Returns:
- true if the code is valid, false otherwise
-
createRow
protected org.zkoss.zul.Row createRow(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, boolean isSingleTransportOffering, StockLevelModel stockLevelModel, String property) Method createsRowfor each stock level entry.- Parameters:
widgetInstanceManager- the widget instance managerisSingleTransportOffering- the is single transport offeringstockLevelModel- the stock level modelproperty- the property- Returns:
- the row
-
createGridColumns
protected void createGridColumns(org.zkoss.zul.Grid modifyInventoryGrid, Boolean isSingleTransportOffering, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Creates grid columns- Parameters:
modifyInventoryGrid- the modify inventory gridisSingleTransportOffering- the is single transport offeringwidgetInstanceManager- the widget instance manager
-
createEditor
protected com.hybris.cockpitng.components.Editor createEditor(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, String type, String defaultEditor, String property, String event) Method that create editor according to given parameter- Parameters:
widgetInstanceManager- the widget instance managertype- the typedefaultEditor- the default editorproperty- the propertyevent- the event- Returns:
- the editor
-
onEvent
public void onEvent(org.zkoss.zk.ui.event.Event event) - Specified by:
onEventin interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
-
getLabelService
protected com.hybris.cockpitng.labels.LabelService getLabelService()Gets label service.- Returns:
- the label service
-
setLabelService
public void setLabelService(com.hybris.cockpitng.labels.LabelService labelService) Sets label service.- Parameters:
labelService- the label service
-