Package com.jalios.jcms.ajax
Class AbstractCtxMenu
java.lang.Object
com.jalios.jcms.context.AbstractJcmsAjaxContext
com.jalios.jcms.ajax.AbstractCtxMenu
- All Implemented Interfaces:
CtxMenuConstants,Serializable
- Direct Known Subclasses:
GroupCtxMenu,MemberCtxMenu,PublicationCtxMenu
This abstract class is the used to process AJAX Contextual Menu.
- Since:
- jcms-5.7.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Stringprotected StringFields inherited from class com.jalios.jcms.context.AbstractJcmsAjaxContext
baseUrl, caddy, channel, contextPath, ctxCategories, currentCategory, debug, isAdmin, isInFrontOffice, isLogged, isWindows, loggedMember, method, parameterMap, portal, portalCategory, pub, resourcePath, url, userCountry, userLang, userLocale, userZoneId, workspace, zoneFields inherited from interface com.jalios.jcms.ajax.CtxMenuConstants
DISABLED, FLAG_CADDY, FLAG_DELETE, FLAG_EDIT, FLAG_EXPORT, FLAG_INSPECT, FLAG_SEPARATOR, INFO_ICON, MENU_DISABLED, MENU_ENABLED, MENU_SKIPPED, NO_ICON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intaddCaddyMenu(StringBuffer sb, Data data) protected intaddDeleteMenu(StringBuffer sb, Data data, String workspaceFilter, boolean isEnabled) protected intaddEditMenu(StringBuffer sb, Data data, boolean isEnabled, boolean popup) voidaddInfo(StringBuffer sb, String label, String value) Adds an info in an info sectionvoidaddInfoImage(StringBuffer sb, String path) Adds an info in an info sectionvoidaddInfoText(StringBuffer sb, String text) Adds an info in an info sectionprotected intaddInspectMenu(StringBuffer sb, Data data) voidaddItem(StringBuffer sb, boolean isEnabled, String icon, String label, String url) Adds a menu itemvoidaddItem(StringBuffer sb, boolean isEnabled, String icon, String label, String url, boolean addRedirect) Adds a menu itemvoidAdds a menu item wit cssvoidaddItem(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String css, String wrapperCss) Adds a menu item with css on the link wrappervoidAdds a menu item separator.voidaddItemWithConfirm(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String confirmMsg) Adds a menu item with a confirm message dialog box.voidaddItemWithConfirm(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String confirmMsg, String specificRedirect) Adds a menu item with a confirm message dialog box.voidaddItemWithJSConfirm(StringBuffer sb, boolean isEnabled, String icon, String label, String func, String confirmMsg) Deprecated, for removal: This API element is subject to removal in a future version.since JCMS-3712, inline onclick event are not compliance with strict Content-Security-Policy.voidaddItemWithOnclick(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String onclick) Deprecated, for removal: This API element is subject to removal in a future version.since JCMS-3712, inline onclick event are not compliance with strict Content-Security-Policy.voidaddItemWithOnclick(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String onclick, String title) Deprecated, for removal: This API element is subject to removal in a future version.since JCMS-3712, inline onclick event are not compliance with strict Content-Security-Policy.voidaddItemWithPrompt(StringBuffer sb, boolean isEnabled, String icon, String label, String func, String promptMsg, String defaultValue) Deprecated, for removal: This API element is subject to removal in a future version.since JCMS-3712, inline onclick event are not compliance with strict Content-Security-Policy.voidaddItemWithPrompt(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String promptMsg, String param, String defaultValue) Deprecated, for removal: This API element is subject to removal in a future version.since JCMS-3712, inline onclick event are not compliance with strict Content-Security-Policy.protected voidaddModalItem(StringBuffer sb, boolean isEnabled, String icon, String label, String url) Adds a modal action using the same button renderer as dropdownItemModal.protected voidaddModalItem(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String wrapperCss) Adds a modal action with a CSS class on its list item.voidcloseItem(StringBuffer sb, String icon, String label) Close a menu item which has got an icon.voidEnds an info sectionvoidEnds an sub-sectionvoidopenItem(StringBuffer sb, boolean isEnabled) Open a menu item which has got an icon.voidopenItem(StringBuffer sb, boolean isEnabled, String css) Open a menu item which has got an icon.voidsetRedirect(String redirect) voidstartInfoSection(StringBuffer sb, String label, String icon) Starts an info sectionvoidstartSubSection(StringBuffer sb, String label, String icon) Starts an sub-sectionvoidstartSubSection(StringBuffer sb, String label, String icon, String ul) Starts an sub-sectionMethods inherited from class com.jalios.jcms.context.AbstractJcmsAjaxContext
checkAccess, checkAccess, debug, deflate, getBaseUrl, getCaddy, getContextPath, getCtxCategories, getCurrentCategory, getLoggedMember, getMethod, getParameterMap, getPortal, getPortalCategory, getPublication, getResourcePath, getUrl, getUserCountry, getUserLang, getUserLocale, getUserZoneId, getWorkspace, getZone, glp, inflate, isAdmin, isInFrontOffice, isLogged, readObject, setBaseUrl, setContextPath, setCtxCategories, setCurrentCategory, setJcmsContext, setLoggedMember, setMethod, setParameterMap, setPortal, setPortalCategory, setPublication, setResourcePath, setUrl, setUserCountry, setUserLang, setUserLocale, setUserZoneId, setWorkspace, writeObject
-
Field Details
-
redirect
-
redirectJSNoCaddy
-
CTX_MENU_CSS_PREFIX
- See Also:
-
CTX_MENU_PUB_CSS_PREFIX
- See Also:
-
CTX_MENU_MBR_CSS_PREFIX
- See Also:
-
CTX_MENU_GROUP_CSS_PREFIX
- See Also:
-
CTX_MENU_WS_CSS_PREFIX
- See Also:
-
CTX_MENU_DATA_CSS_PREFIX
- See Also:
-
-
Constructor Details
-
AbstractCtxMenu
-
-
Method Details
-
addEditMenu
-
addDeleteMenu
-
addInspectMenu
-
addCaddyMenu
-
setRedirect
-
addItemSeparator
Adds a menu item separator.- Parameters:
sb- the StringBuffer- Since:
- jcms-5.7.0
-
addModalItem
protected void addModalItem(StringBuffer sb, boolean isEnabled, String icon, String label, String url) Adds a modal action using the same button renderer as dropdownItemModal.- Parameters:
sb- the StringBufferisEnabled- true if this item is enabledicon- the item iconlabel- the property of the labelurl- the complete modal URL, including any redirect
-
addModalItem
protected void addModalItem(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String wrapperCss) Adds a modal action with a CSS class on its list item.- Parameters:
sb- the StringBufferisEnabled- true if this item is enabledicon- the item iconlabel- the property of the labelurl- the complete modal URL, including any redirectwrapperCss- the CSS class of the list item
-
addItem
Adds a menu item- Parameters:
sb- the StringBufferisEnabled- true if this item is enabledicon- the icon of this itemlabel- the property of the labelurl- the URL to access if the user selects this item- Since:
- jcms-5.7.0
-
addItem
public void addItem(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String css) Adds a menu item wit css- Parameters:
sb- the StringBufferisEnabled- true if this item is enabledicon- the icon of this itemlabel- the property of the labelurl- the URL to access if the user selects this itemcss- o add to link (for modal)- Since:
- jcms-7.0.0
-
addItem
public void addItem(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String css, String wrapperCss) Adds a menu item with css on the link wrapper- Parameters:
sb- the StringBufferisEnabled- true if this item is enabledicon- the icon of this itemlabel- the property of the labelurl- the URL to access if the user selects this itemcss- o add to link (for modal)wrapperCss- added on the link wrapper- Since:
- jcms-9.0.3
-
addItem
public void addItem(StringBuffer sb, boolean isEnabled, String icon, String label, String url, boolean addRedirect) Adds a menu item- Parameters:
sb- the StringBufferisEnabled- true if this item is enabledicon- the icon of this itemlabel- the property of the labelurl- the URL to access if the user selects this itemaddRedirect- if true add a redirect attribute in the url.- Since:
- jcms-5.7.0
-
addItemWithOnclick
@Deprecated(forRemoval=true) public void addItemWithOnclick(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String onclick) Deprecated, for removal: This API element is subject to removal in a future version.since JCMS-3712, inline onclick event are not compliance with strict Content-Security-Policy.Convenient method which delegates toaddItemWithOnclick(StringBuffer, boolean, String, String, String, String, String)- Parameters:
sb- the StringBufferisEnabled- true if this item is enabledicon- the icon of this itemlabel- the property of the labelurl- the URL to access if the user selects this itemonclick- the javascript function to call
-
addItemWithOnclick
@Deprecated(forRemoval=true) public void addItemWithOnclick(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String onclick, String title) Deprecated, for removal: This API element is subject to removal in a future version.since JCMS-3712, inline onclick event are not compliance with strict Content-Security-Policy.Adds a menu item with onclick value. The given url may be null and will be replaced by '#'- Parameters:
sb- the StringBufferisEnabled- true if this item is enabledicon- the icon of this itemlabel- the property of the labelurl- the URL to access if the user selects this itemonclick- the javascript function to calltitle- the title to set- Since:
- jcms-5.7.0
-
addItemWithConfirm
public void addItemWithConfirm(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String confirmMsg) Adds a menu item with a confirm message dialog box.- Parameters:
sb- the StringBufferisEnabled- true if this item is enabledicon- the icon of this itemlabel- the property of the labelurl- the URL to access if the user confirms the dialog boxconfirmMsg- the confirm message- Since:
- jcms-5.7.0
-
addItemWithConfirm
public void addItemWithConfirm(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String confirmMsg, String specificRedirect) Adds a menu item with a confirm message dialog box.- Parameters:
sb- the StringBufferisEnabled- true if this item is enabledicon- the icon of this itemlabel- the property of the labelurl- the URL to access if the user confirms the dialog boxconfirmMsg- the confirm messagespecificRedirect- to force the value of the redirect- Since:
- jcms-5.7.5
-
addItemWithJSConfirm
@Deprecated(forRemoval=true) public void addItemWithJSConfirm(StringBuffer sb, boolean isEnabled, String icon, String label, String func, String confirmMsg) Deprecated, for removal: This API element is subject to removal in a future version.since JCMS-3712, inline onclick event are not compliance with strict Content-Security-Policy.Adds a menu item with a confirm message dialog box.- Parameters:
sb- the StringBufferisEnabled- true if this item is enabledicon- the icon of this itemlabel- the property of the labelfunc- 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
@Deprecated(forRemoval=true) public void addItemWithPrompt(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String promptMsg, String param, String defaultValue) Deprecated, for removal: This API element is subject to removal in a future version.since JCMS-3712, inline onclick event are not compliance with strict Content-Security-Policy.Adds a menu item with an input dialog box. Then redirect prompt value to given url.- Parameters:
sb- the StringBufferisEnabled- true if this item is enabledicon- the iconlabel- the property of the labelurl- the URL to access if the user confirm the dialog boxpromptMsg- the prompt messageparam- the name of the parameter for the input textdefaultValue- the default value of the input- Since:
- jcms-5.7.0
-
addItemWithPrompt
@Deprecated(forRemoval=true) public void addItemWithPrompt(StringBuffer sb, boolean isEnabled, String icon, String label, String func, String promptMsg, String defaultValue) Deprecated, for removal: This API element is subject to removal in a future version.since JCMS-3712, inline onclick event are not compliance with strict Content-Security-Policy.Adds a menu item with an input dialog box. Then call javascript with prompt value.- Parameters:
sb- the StringBufferisEnabled- true if this item is enabledicon- the iconlabel- the property of the labelfunc- the JavaScript function to call with prompt valuepromptMsg- the prompt messagedefaultValue- the default value of the input- Since:
- jcms-5.7.0
-
startSubSection
Starts an sub-section- Parameters:
sb- the StringBufferlabel- the label of the sectionicon- the icon- Since:
- jcms-5.7.0
-
startSubSection
Starts an sub-section- Parameters:
sb- the StringBufferlabel- the label of the sectionicon- the iconul- the class on the ul subsection or null- Since:
- jcms-5.7.0
-
endSubSection
Ends an sub-section- Parameters:
sb- the StringBuffer- Since:
- jcms-5.7.0
-
startInfoSection
Starts an info section- Parameters:
sb- the StringBufferlabel- the label of the sectionicon- the icon- Since:
- jcms-5.7.0
-
endInfoSection
Ends an info section- Parameters:
sb- the StringBuffer- Since:
- jcms-5.7.0
-
addInfo
Adds an info in an info section- Parameters:
sb- the StringBufferlabel- the label of the infovalue- the value- Since:
- jcms-5.7.0
-
addInfoText
Adds an info in an info section- Parameters:
sb- the StringBuffertext- the text to display- Since:
- jcms-5.7.0
-
addInfoImage
Adds an info in an info section- Parameters:
sb- the StringBufferpath- the path of the image to display- Since:
- jcms-6.0.0
-
openItem
Open a menu item which has got an icon.- Parameters:
sb- the StringBufferisEnabled- true if this item is enabled.- Since:
- jcms-5.7.0
-
openItem
Open a menu item which has got an icon.- Parameters:
sb- the StringBufferisEnabled- 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
Close a menu item which has got an icon.- Parameters:
sb- the StringBuffericon- the item iconlabel- the label of the item- Since:
- jcms-5.7.0
-