Class CreateOrEditMarketController

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.farebuckets.CreateOrEditMarketController
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>

public class CreateOrEditMarketController extends com.hybris.cockpitng.util.DefaultWidgetController
This controller will handle events for creating and editing Market
See Also:
  • Field Summary

    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 void
    This method will call create market method, will handle the exception and accordingly notify, show message box to user and send socket event
    void
     
    void
    initialize(org.zkoss.zk.ui.Component comp)
     
    protected void
    this method initialize the combo box with the required values
    protected void
    This method prepare the direction combo box values
    protected void
    This method prepare the trip type combo box values
    void
     
    void
     
    protected void
    This method will call update market method, will handle the exception and accordingly notify, show message box to user and send socket event
    protected boolean
    Validate mandatory form element are not empty

    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, 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
  • Constructor Details

    • CreateOrEditMarketController

      public CreateOrEditMarketController()
  • Method Details

    • initialize

      public void initialize(org.zkoss.zk.ui.Component comp)
      Overrides:
      initialize in class com.hybris.cockpitng.util.DefaultWidgetController
    • initializeSelectors

      protected void initializeSelectors()
      this method initialize the combo box with the required values
    • prepareDirections

      protected void prepareDirections()
      This method prepare the direction combo box values
    • prepareTripType

      protected void prepareTripType()
      This method prepare the trip type combo box values
    • createOrEditMarket

      public void createOrEditMarket(Market market)
    • refresh

      public void refresh()
    • save

      public void save()
    • updateMarket

      protected void updateMarket(Market market)
      This method will call update market method, will handle the exception and accordingly notify, show message box to user and send socket event
      Parameters:
      market - the market
    • createMarket

      protected void createMarket(Market market)
      This method will call create market method, will handle the exception and accordingly notify, show message box to user and send socket event
      Parameters:
      market - the market
    • validateMarketData

      protected boolean validateMarketData()
      Validate mandatory form element are not empty
      Returns:
      the boolean,returns true if validation success else return false