public abstract class AbstractCtxMenu extends AbstractJcmsAjaxContext implements CtxMenuConstants
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
redirect |
protected java.lang.String |
redirectJSNoCaddy |
baseUrl, caddy, channel, contextPath, ctxCategories, currentCategory, debug, isAdmin, isIE, isInFrontOffice, isLogged, isWindows, loggedMember, method, parameterMap, portal, portalCategory, pub, resourcePath, url, userCountry, userLang, userLocale, workspace, zone
DISABLED, FLAG_CADDY, FLAG_DELETE, FLAG_EDIT, FLAG_EXPORT, FLAG_INSPECT, FLAG_SEPARATOR, INFO_ICON, MENU_DISABLED, MENU_ENABLED, MENU_SKIPPED, NO_ICON
Modifier | Constructor and Description |
---|---|
protected |
AbstractCtxMenu(JcmsJspContext ctxt) |
Modifier and Type | Method and Description |
---|---|
protected int |
addCaddyMenu(java.lang.StringBuffer sb,
Data data) |
protected int |
addDeleteMenu(java.lang.StringBuffer sb,
Data data,
java.lang.String workspaceFilter,
boolean isEnabled) |
protected int |
addEditMenu(java.lang.StringBuffer sb,
Data data,
boolean isEnabled,
boolean popup) |
void |
addInfo(java.lang.StringBuffer sb,
java.lang.String label,
java.lang.String value)
Adds an info in an info section
|
void |
addInfoImage(java.lang.StringBuffer sb,
java.lang.String path)
Adds an info in an info section
|
void |
addInfoText(java.lang.StringBuffer sb,
java.lang.String text)
Adds an info in an info section
|
protected int |
addInspectMenu(java.lang.StringBuffer sb,
Data data) |
void |
addItem(java.lang.StringBuffer sb,
boolean isEnabled,
java.lang.String icon,
java.lang.String label,
java.lang.String url)
Adds a menu item
|
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
|
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
|
void |
addItemSeparator(java.lang.StringBuffer sb)
Adds a menu item separator.
|
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.
|
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.
|
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.
|
void |
addItemWithOnclick(java.lang.StringBuffer sb,
boolean isEnabled,
java.lang.String icon,
java.lang.String label,
java.lang.String url,
java.lang.String onclick)
Convenient method which delegates to
addItemWithOnclick(StringBuffer, boolean, String, String, String, String, String) |
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.
|
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.
|
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.
|
void |
closeItem(java.lang.StringBuffer sb,
java.lang.String icon,
java.lang.String label)
Close a menu item which has got an icon.
|
void |
endInfoSection(java.lang.StringBuffer sb)
Ends an info section
|
void |
endSubSection(java.lang.StringBuffer sb)
Ends an sub-section
|
void |
openItem(java.lang.StringBuffer sb,
boolean isEnabled)
Open a menu item which has got an icon.
|
void |
setRedirect(java.lang.String redirect) |
void |
startInfoSection(java.lang.StringBuffer sb,
java.lang.String label,
java.lang.String icon)
Starts an info section
|
void |
startSubSection(java.lang.StringBuffer sb,
java.lang.String label,
java.lang.String icon)
Starts an sub-section
|
void |
startSubSection(java.lang.StringBuffer sb,
java.lang.String label,
java.lang.String icon,
java.lang.String ul)
Starts an sub-section
|
checkAccess, checkAccess, debug, deflate, getBaseUrl, getCaddy, getContextPath, getCtxCategories, getCurrentCategory, getLoggedMember, getMethod, getParameterMap, getPortal, getPortalCategory, getPublication, getResourcePath, getUrl, getUserCountry, getUserLang, getUserLocale, getWorkspace, getZone, glp, inflate, isAdmin, isInFrontOffice, isLogged, readObject, setBaseUrl, setContextPath, setCtxCategories, setCurrentCategory, setJcmsContext, setLoggedMember, setMethod, setParameterMap, setPortal, setPortalCategory, setPublication, setResourcePath, setUrl, setUserCountry, setUserLang, setUserLocale, setWorkspace, writeObject
protected transient java.lang.String redirect
protected transient java.lang.String redirectJSNoCaddy
protected AbstractCtxMenu(JcmsJspContext ctxt)
protected int addEditMenu(java.lang.StringBuffer sb, Data data, boolean isEnabled, boolean popup)
protected int addDeleteMenu(java.lang.StringBuffer sb, Data data, java.lang.String workspaceFilter, boolean isEnabled)
protected int addInspectMenu(java.lang.StringBuffer sb, Data data)
protected int addCaddyMenu(java.lang.StringBuffer sb, Data data)
public void setRedirect(java.lang.String redirect)
public void addItemSeparator(java.lang.StringBuffer sb)
sb
- the StringBufferpublic void addItem(java.lang.StringBuffer sb, boolean isEnabled, java.lang.String icon, java.lang.String label, java.lang.String url)
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 itempublic void addItem(java.lang.StringBuffer sb, boolean isEnabled, java.lang.String icon, java.lang.String label, java.lang.String url, java.lang.String css)
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)public void addItem(java.lang.StringBuffer sb, boolean isEnabled, java.lang.String icon, java.lang.String label, java.lang.String url, boolean addRedirect)
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.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)
addItemWithOnclick(StringBuffer, boolean, String, String, String, String, String)
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 (Note: current implementation use double quote onclick="")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)
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 (Note: current implementation use double quote onclick="")title
- the title to set (should not contains double quotepublic void addItemWithConfirm(java.lang.StringBuffer sb, boolean isEnabled, java.lang.String icon, java.lang.String label, java.lang.String url, java.lang.String confirmMsg)
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 messagepublic 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)
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 redirectpublic void addItemWithJSConfirm(java.lang.StringBuffer sb, boolean isEnabled, java.lang.String icon, java.lang.String label, java.lang.String func, java.lang.String confirmMsg)
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 messagepublic 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)
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 inputpublic 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)
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 inputpublic void startSubSection(java.lang.StringBuffer sb, java.lang.String label, java.lang.String icon)
sb
- the StringBufferlabel
- the label of the sectionicon
- the iconpublic void startSubSection(java.lang.StringBuffer sb, java.lang.String label, java.lang.String icon, java.lang.String ul)
sb
- the StringBufferlabel
- the label of the sectionicon
- the iconul
- the class on the ul subsection or nullpublic void endSubSection(java.lang.StringBuffer sb)
sb
- the StringBufferpublic void startInfoSection(java.lang.StringBuffer sb, java.lang.String label, java.lang.String icon)
sb
- the StringBufferlabel
- the label of the sectionicon
- the iconpublic void endInfoSection(java.lang.StringBuffer sb)
sb
- the StringBufferpublic void addInfo(java.lang.StringBuffer sb, java.lang.String label, java.lang.String value)
sb
- the StringBufferlabel
- the label of the infovalue
- the valuepublic void addInfoText(java.lang.StringBuffer sb, java.lang.String text)
sb
- the StringBuffertext
- the text to displaypublic void addInfoImage(java.lang.StringBuffer sb, java.lang.String path)
sb
- the StringBufferpath
- the path of the image to displaypublic void openItem(java.lang.StringBuffer sb, boolean isEnabled)
sb
- the StringBufferisEnabled
- true if this item is enabled.public void closeItem(java.lang.StringBuffer sb, java.lang.String icon, java.lang.String label)
sb
- the StringBuffericon
- the item iconlabel
- the label of the itemCopyright © 2001-2010 Jalios SA. All Rights Reserved.