Class ReturnCancellationController
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.omsbackoffice.widgets.returns.cancelreturnpopup.ReturnCancellationController
- 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 ReturnCancellationController
extends com.hybris.cockpitng.util.DefaultWidgetController
Controller for the cancellation return pop up
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Objectprotected static final Stringprotected static final StringFields 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 TypeMethodDescriptionvoidConfirm the return approval requestprotected com.hybris.cockpitng.core.events.CockpitEventQueueprotected BackofficeLocaleServiceorg.zkoss.zul.Textboxprotected EnumerationServiceprotected com.hybris.cockpitng.util.notifications.NotificationServiceprotected ReturnCallbackServiceprotected ReturnRequestModelorg.zkoss.zul.Textboxprotected Optional<CancelReason>getSelectedCancelReason(org.zkoss.zk.ui.event.Event event) Gets the label for the selected cancel reason in case the event has a target of Comboboxprotected voidhandleGlobalCancelReason(org.zkoss.zk.ui.event.Event event) Applies a global reason to all individual entries after an event is triggeredvoidinitCancelReturnForm(ReturnRequestModel inputObject) Initialize the popup to choose cancellation reasonprotected Optional<CancelReason>matchingComboboxCancelReason(String cancelReasonLabel) Retrieve theCancelReasonaccording to the selected label in the comboboxprotected voidprocessCancellation(org.zkoss.zk.ui.event.Event event) Process the cancellation only if the user confirmed itvoidsetReturnRequest(ReturnRequestModel returnRequest) voidReinitialize the popup.protected voidCheck if the data provided by the form are compliant with the validation rulesMethods 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
-
IN_SOCKET
- See Also:
-
OUT_CONFIRM
- See Also:
-
COMPLETED
-
-
Constructor Details
-
ReturnCancellationController
public ReturnCancellationController()
-
-
Method Details
-
initCancelReturnForm
Initialize the popup to choose cancellation reason- Parameters:
inputObject- the return request for which we want set the cancellation reason
-
handleGlobalCancelReason
protected void handleGlobalCancelReason(org.zkoss.zk.ui.event.Event event) Applies a global reason to all individual entries after an event is triggered- Parameters:
event- the on select event that was triggered by the user
-
matchingComboboxCancelReason
Retrieve theCancelReasonaccording to the selected label in the combobox- Parameters:
cancelReasonLabel- aStringrepresentation of the reason- Returns:
- the CancelReason corresponding to the label
-
getSelectedCancelReason
Gets the label for the selected cancel reason in case the event has a target of Combobox- Parameters:
event- the event that was fired- Returns:
- the CancelReason corresponding to the label.
-
undoCancelReturn
public void undoCancelReturn()Reinitialize the popup. -
confirmCancelReturn
public void confirmCancelReturn()Confirm the return approval request -
processCancellation
protected void processCancellation(org.zkoss.zk.ui.event.Event event) Process the cancellation only if the user confirmed it- Parameters:
event- the confirmation event coming from the user
-
validateRequest
protected void validateRequest()Check if the data provided by the form are compliant with the validation rules -
getReturnRequest
-
setReturnRequest
-
getEnumerationService
-
getCockpitLocaleService
-
getCockpitEventQueue
protected com.hybris.cockpitng.core.events.CockpitEventQueue getCockpitEventQueue() -
getReturnCallbackService
-
getNotificationService
protected com.hybris.cockpitng.util.notifications.NotificationService getNotificationService() -
getCustomerName
public org.zkoss.zul.Textbox getCustomerName() -
getReturnRequestCode
public org.zkoss.zul.Textbox getReturnRequestCode()
-