Class CreateOrEditMarketBucketController
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.CreateOrEditMarketBucketController
- 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 CreateOrEditMarketBucketController
extends com.hybris.cockpitng.util.DefaultWidgetController
This controller will handle events for creating and editing market bucket
- 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, spaceScopeFields inherited from class org.zkoss.zk.ui.util.GenericComposer
_applied -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFareFamily(FareFamily fareFamily) This method will create tab, panel and toolbar inside a newly created row for addFareFamilyGridvoidprotected voidcreateAddNewFlightColumns(org.zkoss.zul.Grid flightGrid) This method will create columns for ticketDesignator flightGridprotected voidcreateAddNewFlightRow(org.zkoss.zul.Rows flightRows, org.zkoss.zul.Grid flightGrid, FlightRange flightRange) This method will create and add flightRow in flightRowsprotected voidcreateAddTicketDesignatorColumns(org.zkoss.zul.Grid ticketDesignatorGrid) This method will create columns for ticketDesignator gridprotected voidcreateAddTicketDesignatorRow(org.zkoss.zul.Rows ticketDesignatorRows, String ticketDesignator) This method will create and add ticketDesignatorRow in ticketDesignatorRowsprotected voidcreateBaggagePanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily) This method will create Tabpanel content for Baggage tabprotected org.zkoss.zul.RadiogroupThis method will create Radiogroup objectprotected org.zkoss.zul.ButtoncreateButton(String labelKey) This method will create Button objectprotected org.zkoss.zul.CellThis 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 voidThis method will create all combo box that we needed for zk componentprotected org.zkoss.zul.DateboxcreateDateBox(String name) This method will create Datebox objectprotected voidcreateDatesPanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily) This method will create Tabpanel content for Dates tabprotected com.hybris.cockpitng.components.EditorcreateEditor(String type, String attribute) This method will create Editor objectprotected voidcreateFlightPanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily) This method will create Tabpanel content for Baggage tabprotected voidcreateGeneralPanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily) This method will create Tabpanel content for General tabprotected org.zkoss.zul.GridThis 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) This method will create Label objectprotected voidcreateMarketBucket(MarketBucket marketBucket) This method will call create market bucket method, will handle the exception and accordingly notify, show message box to user and send socket eventvoidcreateOrEditMarketBucket(MarketBucket marketBucket) protected voidcreatePricesPanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily) This method will create Tabpanel content for Prices tabprotected org.zkoss.zul.TabcreateTabForFareFamily(String labelKey) This method will create Tab For FareFamilyprotected org.zkoss.zul.TabpanelThis method will create Tabpanel objectprotected org.zkoss.zul.TabpanelscreateTabpanelsForFareFamily(FareFamily fareFamily) This method will create Tabpanels For FareFamily in a sequenceprotected org.zkoss.zul.TabsThis method will create Tabs For FareFamilyprotected org.zkoss.zul.TextboxcreateTextBox(String name) This method will create Textbox objectprotected org.zkoss.zul.ToolbarcreateToolBar(org.zkoss.zul.Row fareFamilyRow) This method will create ToolBar with delete button and onClick EventListener for button to remove FareFamilyprotected voiddeleteFareFamilyItem(org.zkoss.zul.Row fareFamilyRow) This method will remove FareFamilyprotected AbstractMap.SimpleEntry<String,Object> getNameValueMap(org.zkoss.zk.ui.Component child) this method will extract name and value from the Componentvoidinitialize(org.zkoss.zk.ui.Component comp) protected DateparseDateInStringToDate(String dateInString) This method will parse string date in date objectprotected voidThis method will populate common view dataprotected voidpopulateFareFamilyFromBaggageTab(FareFamily fareFamily, org.zkoss.zul.Rows baggageTabRows) this method will populate fareFamily data from baggageTabRowsprotected voidpopulateFareFamilyFromDatesTab(FareFamily fareFamily, org.zkoss.zul.Rows datesTabRows) this method will populate FareFamily data from datesTabRowsprotected voidpopulateFareFamilyFromFlightTab(FareFamily fareFamily, org.zkoss.zul.Rows flightTabRows) this method will populate fareFamily data from flightTabRowsprotected voidpopulateFareFamilyFromGeneralTab(FareFamily fareFamily, org.zkoss.zul.Rows generalTabRows) this method will populate FareFamily data from generalTabRowsprotected voidpopulateFareFamilyFromPricesTab(FareFamily fareFamily, org.zkoss.zul.Rows pricesTabRows) this method will populate fareFamily data from pricesTabRowsprotected voidpopulateMarketBucket(MarketBucket marketBucket) This method will populate Market Bucket object from zk componentsprotected voidpopulateTicketDesignator(FareFamily fareFamily, org.zkoss.zk.ui.Component child) this method will populate TicketDesignator data from ticketDesignatorGridvoidrefresh()voidsave()protected voidupdateMarketBucket(MarketBucket marketBucket) This method will call update market bucket method, will handle the exception and accordingly notify, show message box to user and send socket eventprotected booleanValidate mandatory form element are not empty and logical dataMethods 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, 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
-
Constructor Details
-
CreateOrEditMarketBucketController
public CreateOrEditMarketBucketController()
-
-
Method Details
-
initialize
public void initialize(org.zkoss.zk.ui.Component comp) - Overrides:
initializein classcom.hybris.cockpitng.util.DefaultWidgetController
-
createOrEditMarketBucket
-
refresh
public void refresh() -
save
public void save() -
addFareFamilyEvent
public void addFareFamilyEvent() -
addFareFamily
This method will create tab, panel and toolbar inside a newly created row for addFareFamilyGrid- Parameters:
fareFamily- the fareFamily
-
createMarketBucket
This method will call create market bucket method, will handle the exception and accordingly notify, show message box to user and send socket event- Parameters:
marketBucket- the marketBucket
-
updateMarketBucket
This method will call update market bucket method, will handle the exception and accordingly notify, show message box to user and send socket event- Parameters:
marketBucket- the marketBucket
-
validateMarketBucketData
protected boolean validateMarketBucketData()Validate mandatory form element are not empty and logical data- Returns:
- the boolean,returns true if validation success else return false
-
createComboBoxList
protected void createComboBoxList()This method will create all combo box that we needed for zk component -
createComboBoxData
This method will create ComboBoxData object- Parameters:
value- the valuelabelKey- the label key- Returns:
-
populateCommonViewData
protected void populateCommonViewData()This method will populate common view data -
populateMarketBucket
This method will populate Market Bucket object from zk components- Parameters:
marketBucket- the marketBucket
-
populateFareFamilyFromGeneralTab
protected void populateFareFamilyFromGeneralTab(FareFamily fareFamily, org.zkoss.zul.Rows generalTabRows) this method will populate FareFamily data from generalTabRows- Parameters:
fareFamily- the fareFamilygeneralTabRows- the generalTabRows
-
populateFareFamilyFromDatesTab
protected void populateFareFamilyFromDatesTab(FareFamily fareFamily, org.zkoss.zul.Rows datesTabRows) this method will populate FareFamily data from datesTabRows- Parameters:
fareFamily- the fareFamilydatesTabRows- the datesTabRows
-
populateTicketDesignator
this method will populate TicketDesignator data from ticketDesignatorGrid- Parameters:
fareFamily- the fareFamilychild- the div component
-
populateFareFamilyFromPricesTab
protected void populateFareFamilyFromPricesTab(FareFamily fareFamily, org.zkoss.zul.Rows pricesTabRows) this method will populate fareFamily data from pricesTabRows- Parameters:
fareFamily- the fareFamilypricesTabRows- the pricesTabRows
-
populateFareFamilyFromBaggageTab
protected void populateFareFamilyFromBaggageTab(FareFamily fareFamily, org.zkoss.zul.Rows baggageTabRows) this method will populate fareFamily data from baggageTabRows- Parameters:
fareFamily- the fareFamilybaggageTabRows- the baggageTabRows
-
populateFareFamilyFromFlightTab
protected void populateFareFamilyFromFlightTab(FareFamily fareFamily, org.zkoss.zul.Rows flightTabRows) this method will populate fareFamily data from flightTabRows- Parameters:
fareFamily- the fareFamilyflightTabRows- the flightTabRows
-
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
-
createTabsForFareFamily
protected org.zkoss.zul.Tabs createTabsForFareFamily()This method will create Tabs For FareFamily- Returns:
- the Tabs
-
createTabForFareFamily
This method will create Tab For FareFamily- Parameters:
labelKey- the labelKey- Returns:
-
createTabpanelsForFareFamily
This method will create Tabpanels For FareFamily in a sequence- Parameters:
fareFamily- the fareFamily- Returns:
- the Tabpanels
-
createToolBar
protected org.zkoss.zul.Toolbar createToolBar(org.zkoss.zul.Row fareFamilyRow) This method will create ToolBar with delete button and onClick EventListener for button to remove FareFamily- Parameters:
fareFamilyRow- the fareFamilyRow- Returns:
- the Toolbar
-
deleteFareFamilyItem
protected void deleteFareFamilyItem(org.zkoss.zul.Row fareFamilyRow) This method will remove FareFamily- Parameters:
fareFamilyRow- the row
-
createGeneralPanel
This method will create Tabpanel content for General tab- Parameters:
fareFamily- the fareFamilytabpanels- the tabpanels
-
createDatesPanel
This method will create Tabpanel content for Dates tab- Parameters:
fareFamily- the fareFamilytabpanels- the tabpanels
-
createPricesPanel
This method will create Tabpanel content for Prices tab- Parameters:
fareFamily- the fareFamilytabpanels- the tabpanels
-
createBaggagePanel
This method will create Tabpanel content for Baggage tab- Parameters:
fareFamily- the fareFamilytabpanels- the tabpanels
-
createFlightPanel
This method will create Tabpanel content for Baggage tab- Parameters:
fareFamily- the fareFamilytabpanels- the tabpanels
-
createGrid
protected org.zkoss.zul.Grid createGrid()This method will create Grid object and append Rows object to the grid- Returns:
- the Grid
-
createTabpanel
protected org.zkoss.zul.Tabpanel createTabpanel()This method will create Tabpanel object- Returns:
- the tabpanel
-
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
-
createIntBox
This method will create Intbox object- Parameters:
name- the name- Returns:
- the Intbox
-
createButton
This method will create Button object- Parameters:
labelKey- the labelKey from labels properties- Returns:
- the Button
-
createDateBox
This method will create Datebox object- Parameters:
name- the name- Returns:
- the Datebox
-
createEditor
This method will create Editor object- Parameters:
type- the item typeattribute- the attribute- Returns:
- the Editor
-
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
-
createBooleanRadiogroup
This method will create Radiogroup object- Parameters:
name- the name- Returns:
- the Radiogroup
-
createColumn
This method will create Column object- Parameters:
labelKey- the labelKey from labels properties- Returns:
- the Column
-
createCell
protected org.zkoss.zul.Cell createCell()This method will create Cell object- Returns:
- the Cell
-
createAddTicketDesignatorColumns
protected void createAddTicketDesignatorColumns(org.zkoss.zul.Grid ticketDesignatorGrid) This method will create columns for ticketDesignator grid- Parameters:
ticketDesignatorGrid- the ticketDesignatorGrid
-
createAddTicketDesignatorRow
protected void createAddTicketDesignatorRow(org.zkoss.zul.Rows ticketDesignatorRows, String ticketDesignator) This method will create and add ticketDesignatorRow in ticketDesignatorRows- Parameters:
ticketDesignator- the ticketDesignatorticketDesignatorRows- the ticketDesignatorRows
-
createAddNewFlightColumns
protected void createAddNewFlightColumns(org.zkoss.zul.Grid flightGrid) This method will create columns for ticketDesignator flightGrid- Parameters:
flightGrid-
-
createAddNewFlightRow
protected void createAddNewFlightRow(org.zkoss.zul.Rows flightRows, org.zkoss.zul.Grid flightGrid, FlightRange flightRange) This method will create and add flightRow in flightRows- Parameters:
flightRows- the flightRowsflightGrid- the flightGridflightRange- the flightRange
-
parseDateInStringToDate
This method will parse string date in date object- Parameters:
dateInString- the dateInString- Returns:
- the date
-