Class AbstractCtxMenu

    • Field Detail

      • redirect

        protected transient java.lang.String redirect
      • redirectJSNoCaddy

        protected transient java.lang.String redirectJSNoCaddy
      • CTX_MENU_CSS_PREFIX

        public static final java.lang.String CTX_MENU_CSS_PREFIX
        See Also:
        Constant Field Values
      • CTX_MENU_PUB_CSS_PREFIX

        public static final java.lang.String CTX_MENU_PUB_CSS_PREFIX
        See Also:
        Constant Field Values
      • CTX_MENU_MBR_CSS_PREFIX

        public static final java.lang.String CTX_MENU_MBR_CSS_PREFIX
        See Also:
        Constant Field Values
      • CTX_MENU_GROUP_CSS_PREFIX

        public static final java.lang.String CTX_MENU_GROUP_CSS_PREFIX
        See Also:
        Constant Field Values
      • CTX_MENU_WS_CSS_PREFIX

        public static final java.lang.String CTX_MENU_WS_CSS_PREFIX
        See Also:
        Constant Field Values
      • CTX_MENU_DATA_CSS_PREFIX

        public static final java.lang.String CTX_MENU_DATA_CSS_PREFIX
        See Also:
        Constant Field Values
    • Constructor Detail

    • Method Detail

      • addEditMenu

        protected int addEditMenu​(java.lang.StringBuffer sb,
                                  Data data,
                                  boolean isEnabled,
                                  boolean popup)
      • addDeleteMenu

        protected int addDeleteMenu​(java.lang.StringBuffer sb,
                                    Data data,
                                    java.lang.String workspaceFilter,
                                    boolean isEnabled)
      • addInspectMenu

        protected int addInspectMenu​(java.lang.StringBuffer sb,
                                     Data data)
      • addCaddyMenu

        protected int addCaddyMenu​(java.lang.StringBuffer sb,
                                   Data data)
      • setRedirect

        public void setRedirect​(java.lang.String redirect)
      • addItemSeparator

        public void addItemSeparator​(java.lang.StringBuffer sb)
        Adds a menu item separator.
        Parameters:
        sb - the StringBuffer
        Since:
        jcms-5.7.0
      • addItem

        public void addItem​(java.lang.StringBuffer sb,
                            boolean isEnabled,
                            java.lang.String icon,
                            java.lang.String label,
                            java.lang.String url)
        Adds a menu item
        Parameters:
        sb - the StringBuffer
        isEnabled - true if this item is enabled
        icon - the icon of this item
        label - the property of the label
        url - the URL to access if the user selects this item
        Since:
        jcms-5.7.0
      • addItem

        public void addItem​(java.lang.StringBuffer sb,
                            boolean isEnabled,
                            java.lang.String icon,
                            java.lang.String label,
                            java.lang.String url,
                            java.lang.String css)
        Adds a menu item wit css
        Parameters:
        sb - the StringBuffer
        isEnabled - true if this item is enabled
        icon - the icon of this item
        label - the property of the label
        url - the URL to access if the user selects this item
        css - o add to link (for modal)
        Since:
        jcms-7.0.0
      • addItem

        public void addItem​(java.lang.StringBuffer sb,
                            boolean isEnabled,
                            java.lang.String icon,
                            java.lang.String label,
                            java.lang.String url,
                            java.lang.String css,
                            java.lang.String wrapperCss)
        Adds a menu item with css on the link wrapper
        Parameters:
        sb - the StringBuffer
        isEnabled - true if this item is enabled
        icon - the icon of this item
        label - the property of the label
        css - o add to link (for modal)
        wrapperCss - added on the link wrapper
        url - the URL to access if the user selects this item
        Since:
        jcms-9.0.3
      • addItem

        public void addItem​(java.lang.StringBuffer sb,
                            boolean isEnabled,
                            java.lang.String icon,
                            java.lang.String label,
                            java.lang.String url,
                            boolean addRedirect)
        Adds a menu item
        Parameters:
        sb - the StringBuffer
        isEnabled - true if this item is enabled
        icon - the icon of this item
        label - the property of the label
        url - the URL to access if the user selects this item
        addRedirect - if true add a redirect attribute in the url.
        Since:
        jcms-5.7.0
      • addItemWithOnclick

        public void addItemWithOnclick​(java.lang.StringBuffer sb,
                                       boolean isEnabled,
                                       java.lang.String icon,
                                       java.lang.String label,
                                       java.lang.String url,
                                       java.lang.String onclick)
        Parameters:
        sb - the StringBuffer
        isEnabled - true if this item is enabled
        icon - the icon of this item
        label - the property of the label
        url - the URL to access if the user selects this item
        onclick - the javascript function to call (Note: current implementation use double quote onclick="")
      • addItemWithOnclick

        public void addItemWithOnclick​(java.lang.StringBuffer sb,
                                       boolean isEnabled,
                                       java.lang.String icon,
                                       java.lang.String label,
                                       java.lang.String url,
                                       java.lang.String onclick,
                                       java.lang.String title)
        Adds a menu item with onclick value. The given url may be null and will be replaced by '#'
        Parameters:
        sb - the StringBuffer
        isEnabled - true if this item is enabled
        icon - the icon of this item
        label - the property of the label
        url - the URL to access if the user selects this item
        onclick - the javascript function to call (Note: current implementation use double quote onclick="")
        title - the title to set (should not contains double quote
        Since:
        jcms-5.7.0
      • addItemWithConfirm

        public void addItemWithConfirm​(java.lang.StringBuffer sb,
                                       boolean isEnabled,
                                       java.lang.String icon,
                                       java.lang.String label,
                                       java.lang.String url,
                                       java.lang.String confirmMsg)
        Adds a menu item with a confirm message dialog box.
        Parameters:
        sb - the StringBuffer
        isEnabled - true if this item is enabled
        icon - the icon of this item
        label - the property of the label
        url - the URL to access if the user confirms the dialog box
        confirmMsg - the confirm message
        Since:
        jcms-5.7.0
      • addItemWithConfirm

        public void addItemWithConfirm​(java.lang.StringBuffer sb,
                                       boolean isEnabled,
                                       java.lang.String icon,
                                       java.lang.String label,
                                       java.lang.String url,
                                       java.lang.String confirmMsg,
                                       java.lang.String specificRedirect)
        Adds a menu item with a confirm message dialog box.
        Parameters:
        sb - the StringBuffer
        isEnabled - true if this item is enabled
        icon - the icon of this item
        label - the property of the label
        url - the URL to access if the user confirms the dialog box
        confirmMsg - the confirm message
        specificRedirect - to force the value of the redirect
        Since:
        jcms-5.7.5
      • addItemWithJSConfirm

        public void addItemWithJSConfirm​(java.lang.StringBuffer sb,
                                         boolean isEnabled,
                                         java.lang.String icon,
                                         java.lang.String label,
                                         java.lang.String func,
                                         java.lang.String confirmMsg)
        Adds a menu item with a confirm message dialog box.
        Parameters:
        sb - the StringBuffer
        isEnabled - true if this item is enabled
        icon - the icon of this item
        label - the property of the label
        func - the JavaScript Func to call if the user confirms the dialog box If you need to use string literal in your function, use the simple quote ('), e.g : String func = "function() {Popup.popupWindow('"+url+"', 'Something');}";
        confirmMsg - the confirm message
        Since:
        jcms-5.7.0
      • addItemWithPrompt

        public void addItemWithPrompt​(java.lang.StringBuffer sb,
                                      boolean isEnabled,
                                      java.lang.String icon,
                                      java.lang.String label,
                                      java.lang.String url,
                                      java.lang.String promptMsg,
                                      java.lang.String param,
                                      java.lang.String defaultValue)
        Adds a menu item with an input dialog box. Then redirect prompt value to given url.
        Parameters:
        sb - the StringBuffer
        isEnabled - true if this item is enabled
        icon - the icon
        label - the property of the label
        url - the URL to access if the user confirm the dialog box
        promptMsg - the prompt message
        param - the name of the parameter for the input text
        defaultValue - the default value of the input
        Since:
        jcms-5.7.0
      • addItemWithPrompt

        public void addItemWithPrompt​(java.lang.StringBuffer sb,
                                      boolean isEnabled,
                                      java.lang.String icon,
                                      java.lang.String label,
                                      java.lang.String func,
                                      java.lang.String promptMsg,
                                      java.lang.String defaultValue)
        Adds a menu item with an input dialog box. Then call javascript with prompt value.
        Parameters:
        sb - the StringBuffer
        isEnabled - true if this item is enabled
        icon - the icon
        label - the property of the label
        func - the JavaScript function to call with prompt value
        promptMsg - the prompt message
        defaultValue - the default value of the input
        Since:
        jcms-5.7.0
      • startSubSection

        public void startSubSection​(java.lang.StringBuffer sb,
                                    java.lang.String label,
                                    java.lang.String icon)
        Starts an sub-section
        Parameters:
        sb - the StringBuffer
        label - the label of the section
        icon - the icon
        Since:
        jcms-5.7.0
      • startSubSection

        public void startSubSection​(java.lang.StringBuffer sb,
                                    java.lang.String label,
                                    java.lang.String icon,
                                    java.lang.String ul)
        Starts an sub-section
        Parameters:
        sb - the StringBuffer
        label - the label of the section
        icon - the icon
        ul - the class on the ul subsection or null
        Since:
        jcms-5.7.0
      • endSubSection

        public void endSubSection​(java.lang.StringBuffer sb)
        Ends an sub-section
        Parameters:
        sb - the StringBuffer
        Since:
        jcms-5.7.0
      • startInfoSection

        public void startInfoSection​(java.lang.StringBuffer sb,
                                     java.lang.String label,
                                     java.lang.String icon)
        Starts an info section
        Parameters:
        sb - the StringBuffer
        label - the label of the section
        icon - the icon
        Since:
        jcms-5.7.0
      • endInfoSection

        public void endInfoSection​(java.lang.StringBuffer sb)
        Ends an info section
        Parameters:
        sb - the StringBuffer
        Since:
        jcms-5.7.0
      • addInfo

        public void addInfo​(java.lang.StringBuffer sb,
                            java.lang.String label,
                            java.lang.String value)
        Adds an info in an info section
        Parameters:
        sb - the StringBuffer
        label - the label of the info
        value - the value
        Since:
        jcms-5.7.0
      • addInfoText

        public void addInfoText​(java.lang.StringBuffer sb,
                                java.lang.String text)
        Adds an info in an info section
        Parameters:
        sb - the StringBuffer
        text - the text to display
        Since:
        jcms-5.7.0
      • addInfoImage

        public void addInfoImage​(java.lang.StringBuffer sb,
                                 java.lang.String path)
        Adds an info in an info section
        Parameters:
        sb - the StringBuffer
        path - the path of the image to display
        Since:
        jcms-6.0.0
      • openItem

        public void openItem​(java.lang.StringBuffer sb,
                             boolean isEnabled)
        Open a menu item which has got an icon.
        Parameters:
        sb - the StringBuffer
        isEnabled - true if this item is enabled.
        Since:
        jcms-5.7.0
      • openItem

        public void openItem​(java.lang.StringBuffer sb,
                             boolean isEnabled,
                             java.lang.String css)
        Open a menu item which has got an icon.
        Parameters:
        sb - the StringBuffer
        isEnabled - true if this item is enabled.
        css - the css to add in class attribute (Will be added on the LI element)
        Since:
        jcms-9.0.3
      • closeItem

        public void closeItem​(java.lang.StringBuffer sb,
                              java.lang.String icon,
                              java.lang.String label)
        Close a menu item which has got an icon.
        Parameters:
        sb - the StringBuffer
        icon - the item icon
        label - the label of the item
        Since:
        jcms-5.7.0