Class ConsignmentMenuRenderer

  • All Implemented Interfaces:
    com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zul.Listcell,​com.hybris.cockpitng.core.config.impl.jaxb.listview.ListColumn,​java.lang.Object>

    public class ConsignmentMenuRenderer
    extends java.lang.Object
    implements com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zul.Listcell,​com.hybris.cockpitng.core.config.impl.jaxb.listview.ListColumn,​java.lang.Object>
    Renders the three-dots menu in order to display some options while viewing tasks in the Inbox section.
    • Field Detail

      • ROW_POPUP_STYLE

        protected static final java.lang.String ROW_POPUP_STYLE
        See Also:
        Constant Field Values
      • SOCKET_OUT_CONTEXT

        protected static final java.lang.String SOCKET_OUT_CONTEXT
        See Also:
        Constant Field Values
      • CAN_PRINT_RETURNFORM_KEY

        protected static final java.lang.String CAN_PRINT_RETURNFORM_KEY
        See Also:
        Constant Field Values
      • CAN_PRINT_RETURNSHIPPINGLABEL_KEY

        protected static final java.lang.String CAN_PRINT_RETURNSHIPPINGLABEL_KEY
        See Also:
        Constant Field Values
      • NON_SELECTABLE_TAGS

        protected static final java.lang.String NON_SELECTABLE_TAGS
        See Also:
        Constant Field Values
      • MENU_POPUP_POSITION

        protected static final java.lang.String MENU_POPUP_POSITION
        See Also:
        Constant Field Values
      • CAPTURE_PAYMENT_ON_CONSIGNMENT

        protected static final java.lang.String CAPTURE_PAYMENT_ON_CONSIGNMENT
        See Also:
        Constant Field Values
    • Constructor Detail

      • ConsignmentMenuRenderer

        public ConsignmentMenuRenderer()
    • Method Detail

      • render

        public void render​(org.zkoss.zul.Listcell listCell,
                           com.hybris.cockpitng.core.config.impl.jaxb.listview.ListColumn columnConfiguration,
                           java.lang.Object object,
                           com.hybris.cockpitng.dataaccess.facades.type.DataType dataType,
                           com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
        Specified by:
        render in interface com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zul.Listcell,​com.hybris.cockpitng.core.config.impl.jaxb.listview.ListColumn,​java.lang.Object>
      • createMenuPopup

        protected org.zkoss.zul.Menupopup createMenuPopup​(WorkflowActionModel workflowActionModel,
                                                          com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
        Creates the popup menu associated to the three-dots menu. All options associated to a ConsignmentModel must be placed here.
        Parameters:
        workflowActionModel - the WorkflowActionModel with the attached ConsignmentModel which will be used to populate the various actions
        widgetInstanceManager - the WidgetInstanceManager
        Returns:
        the newly populated Menupopup
      • onActionClick

        protected void onActionClick​(org.zkoss.zul.Listcell actionColumn,
                                     org.zkoss.zul.Menupopup menuPopup)
        Brings up the popup menu.
        Parameters:
        actionColumn - the Listcell which was selected
        menuPopup - the Menupopup that will be opened
      • resolveLabel

        protected java.lang.String resolveLabel​(java.lang.String labelKey)
        Gets the localized label for the given key.
        Parameters:
        labelKey - the key for which the label is required
        Returns:
        the localized label
      • printExportSlip

        protected void printExportSlip​(ConsignmentModel consignmentModel)
        Prints the export slip for a ConsignmentModel if possible.
        Parameters:
        consignmentModel - the ConsignmentModel for which the export slip will be printed
      • getReallocableConsignmentStatuses

        protected java.util.List<ConsignmentStatus> getReallocableConsignmentStatuses()