Class ComponentsHelper
- java.lang.Object
-
- de.hybris.platform.cockpit.components.ComponentsHelper
-
public class ComponentsHelper extends java.lang.ObjectHelper class for creating same components across cockpits
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPRINCIPALunder this constant models are set in menu items
-
Constructor Summary
Constructors Constructor Description ComponentsHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcreateMenuWithUsers(org.zkoss.zul.Menupopup parentMenupopup, PrincipalModel parentPrincipal, java.util.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 themstatic org.zkoss.zul.PopupcreateSimpleRenamePopup(java.lang.String defaultNameValue, org.zkoss.zk.ui.Component parent, org.zkoss.zk.ui.event.EventListener onOkListener)static voiddisplayConfirmationPopup(java.lang.String title, java.lang.String message, org.zkoss.zk.ui.event.EventListener onYesListener)Displays yes/no confirmation popup.static voiddisplayConfirmationPopup(org.zkoss.zk.ui.event.EventListener onYesListener)Displays yes/no confirmation popup.static voiddisplayCustomNotification(java.lang.String title, java.lang.String messageKey, java.lang.Object... messageAttrs)Displays notification with given title and messageKey.static voiddisplayNotification(java.lang.String captionKey, java.lang.String messageKey, java.lang.Object... messageAttrs)Displays notification with given captionKey title and message
-
-
-
Field Detail
-
PRINCIPAL
public static final java.lang.String PRINCIPAL
under this constant models are set in menu items- See Also:
- Constant Field Values
-
-
Method Detail
-
createMenuWithUsers
public static void createMenuWithUsers(org.zkoss.zul.Menupopup parentMenupopup, PrincipalModel parentPrincipal, java.util.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 toparentPrincipal- top lever user/group to down traversecheckedUsers- users that should be marked as checkedlistener- to handle menu checks
-
displayNotification
public static void displayNotification(java.lang.String captionKey, java.lang.String messageKey, java.lang.Object... messageAttrs)Displays notification with given captionKey title and message
-
displayCustomNotification
public static void displayCustomNotification(java.lang.String title, java.lang.String messageKey, java.lang.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(java.lang.String defaultNameValue, org.zkoss.zk.ui.Component parent, org.zkoss.zk.ui.event.EventListener onOkListener)- Parameters:
defaultNameValue- default value typed in popupparent- component to which this popup will be attached and displayed directly under itonOkListener- listener to catch onOk event.- Returns:
- popup for changing text value e.g. of item name
-
displayConfirmationPopup
public static void displayConfirmationPopup(java.lang.String title, java.lang.String message, org.zkoss.zk.ui.event.EventListener onYesListener)Displays yes/no confirmation popup.- Parameters:
onYesListener- listener to handle clicks on 'yes' buttontitle- displayed messagemessage- 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
-
-