Class AbstractScheduleConfigurationDayRenderer
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.scheduleconfiguration.AbstractScheduleConfigurationDayRenderer
- 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>
- Direct Known Subclasses:
CreateScheduleConfigurationDayRenderer,ModifyScheduleConfigurationDayRenderer
public abstract class AbstractScheduleConfigurationDayRenderer
extends com.hybris.cockpitng.widgets.configurableflow.renderer.DefaultCustomViewRenderer
implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
An abstract class to have the common functionality for ScheduleConfiguration wizard.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.zkoss.zul.RowcreateConfigDayRow(boolean isReadOnly, ScheduleConfigurationModel scheduleConfigurationModel, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, DayOfWeek dayOfWeek, boolean isModifiedConfiguration, ScheduleConfigurationDayModel scheduleConfigurationDay) Creates and return an instance ofRow, it represents the configuration of a calendar day on ScheduleConfiguration wizard.protected com.hybris.cockpitng.components.EditorcreateEditor(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, String type, String defaultEditor, String property, String event, boolean isReadOnly, ScheduleConfigurationDayModel scheduleConfigurationDay) Method that create editor according to given parameterprotected org.zkoss.zul.GridcreateGridLayout(org.zkoss.zul.Div container) Creates grid layoutgetAllValidDays(ScheduleConfigurationModel scheduleConfiguration) Returns set of weekdays between the range of start and end date.protected com.hybris.cockpitng.labels.LabelServiceprotected voidhandleCopyButtonEvent(org.zkoss.zk.ui.event.Event event, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Method handles the copy/paste event on backoffice's ScheduleConfiguration grid.voidonEvent(org.zkoss.zk.ui.event.Event event) Method that handles event associated toScheduleConfigurationDayModel's fields and make checkbox autoselected once user start typing/selecting corresponding field.protected voidpopulateValueToEditor(List<org.zkoss.zk.ui.Component> components, ScheduleConfigurationDayModel targetScheduleConfiguration) Method populates copiedScheduleConfigurationDayModelvalues to target row.voidsetLabelService(com.hybris.cockpitng.labels.LabelService labelService) Methods inherited from class com.hybris.cockpitng.widgets.configurableflow.renderer.DefaultCustomViewRenderer
renderMethods 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
-
Field Details
-
CHECKBOX_EDITOR
- See Also:
-
REFERENCE_EDITOR
- See Also:
-
TIME_EDITOR
- See Also:
-
DURATION_SPINNER_EDITOR
- See Also:
-
TERMINAL_DROPDOWN_EDITOR
- See Also:
-
REFERENCE_TYPE
- See Also:
-
BUTTON_DISABLE_CLASS
- See Also:
-
copiedConfiguration
-
-
Constructor Details
-
AbstractScheduleConfigurationDayRenderer
public AbstractScheduleConfigurationDayRenderer()
-
-
Method Details
-
createConfigDayRow
protected org.zkoss.zul.Row createConfigDayRow(boolean isReadOnly, ScheduleConfigurationModel scheduleConfigurationModel, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, DayOfWeek dayOfWeek, boolean isModifiedConfiguration, ScheduleConfigurationDayModel scheduleConfigurationDay) Creates and return an instance ofRow, it represents the configuration of a calendar day on ScheduleConfiguration wizard.- Parameters:
isReadOnly-scheduleConfigurationModel-widgetInstanceManager-dayOfWeek-isModifiedConfiguration-scheduleConfigurationDay-
-
createGridLayout
protected org.zkoss.zul.Grid createGridLayout(org.zkoss.zul.Div container) Creates grid layout- Parameters:
container-
-
onEvent
Method that handles event associated toScheduleConfigurationDayModel's fields and make checkbox autoselected once user start typing/selecting corresponding field.- Specified by:
onEventin interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>- Throws:
Exception
-
populateValueToEditor
protected void populateValueToEditor(List<org.zkoss.zk.ui.Component> components, ScheduleConfigurationDayModel targetScheduleConfiguration) Method populates copiedScheduleConfigurationDayModelvalues to target row.- Parameters:
components-targetScheduleConfiguration-
-
createEditor
protected com.hybris.cockpitng.components.Editor createEditor(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, String type, String defaultEditor, String property, String event, boolean isReadOnly, ScheduleConfigurationDayModel scheduleConfigurationDay) Method that create editor according to given parameter- Parameters:
widgetInstanceManager-type-defaultEditor-property-event-
-
handleCopyButtonEvent
protected void handleCopyButtonEvent(org.zkoss.zk.ui.event.Event event, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager) Method handles the copy/paste event on backoffice's ScheduleConfiguration grid.- Parameters:
event-widgetInstanceManager-
-
getAllValidDays
Returns set of weekdays between the range of start and end date.- Parameters:
scheduleConfiguration-
-
getLabelService
protected com.hybris.cockpitng.labels.LabelService getLabelService() -
setLabelService
public void setLabelService(com.hybris.cockpitng.labels.LabelService labelService)
-