Class ComponentsHelper

java.lang.Object
de.hybris.platform.cockpit.components.ComponentsHelper

public class ComponentsHelper extends Object
Helper class for creating same components across cockpits
  • Field Details

  • Constructor Details

    • ComponentsHelper

      public ComponentsHelper()
  • Method Details

    • createMenuWithUsers

      public static void createMenuWithUsers(org.zkoss.zul.Menupopup parentMenupopup, PrincipalModel parentPrincipal, Collection<PrincipalModel> checkedUsers, org.zkoss.zk.ui.event.EventListener listener)
      Creates tree-like structure of menu positions containing users' groups and users, so that user can check/uncheck them
      Parameters:
      parentMenupopup - to attach to
      parentPrincipal - top lever user/group to down traverse
      checkedUsers - users that should be marked as checked
      listener - to handle menu checks
    • displayNotification

      public static void displayNotification(String captionKey, String messageKey, Object... messageAttrs)
      Displays notification with given captionKey title and message
    • displayCustomNotification

      public static void displayCustomNotification(String title, String messageKey, Object... messageAttrs)
      Displays notification with given title and messageKey. Title is given direclty as String (not resource key)
    • createSimpleRenamePopup

      public static org.zkoss.zul.Popup createSimpleRenamePopup(String defaultNameValue, org.zkoss.zk.ui.Component parent, org.zkoss.zk.ui.event.EventListener onOkListener)
      Parameters:
      defaultNameValue - default value typed in popup
      parent - component to which this popup will be attached and displayed directly under it
      onOkListener - listener to catch onOk event.
      Returns:
      popup for changing text value e.g. of item name
    • displayConfirmationPopup

      public static void displayConfirmationPopup(String title, String message, org.zkoss.zk.ui.event.EventListener onYesListener)
      Displays yes/no confirmation popup.
      Parameters:
      onYesListener - listener to handle clicks on 'yes' button
      title - displayed message
      message - displayed title
    • displayConfirmationPopup

      public static void displayConfirmationPopup(org.zkoss.zk.ui.event.EventListener onYesListener)
      Displays yes/no confirmation popup.
      Parameters:
      onYesListener - listener to handle clicks on 'yes' button