|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.context.AbstractJcmsAjaxContext com.jalios.jcms.ajax.AbstractCtxMenu
public abstract class AbstractCtxMenu
This abstract class is the used to process AJAX Contextual Menu.
Field Summary | |
---|---|
protected String |
redirect
|
protected String |
redirectJSNoCaddy
|
Fields inherited from class com.jalios.jcms.context.AbstractJcmsAjaxContext |
---|
baseUrl, caddy, channel, contextPath, ctxCategories, currentCategory, debug, isAdmin, isIE, isInFrontOffice, isLogged, isWindows, loggedMember, method, parameterMap, portal, portalCategory, pub, resourcePath, url, userLang, userLocale, workspace, zone |
Fields inherited from interface com.jalios.jcms.ajax.CtxMenuConstants |
---|
DISABLED, FLAG_CADDY, FLAG_DELETE, FLAG_EDIT, FLAG_EXPORT, FLAG_SEPARATOR, INFO_ICON, MENU_DISABLED, MENU_ENABLED, MENU_SKIPPED, NO_ICON |
Constructor Summary | |
---|---|
protected |
AbstractCtxMenu(JcmsJspContext ctxt)
|
Method Summary | |
---|---|
protected int |
addCaddyMenu(StringBuffer sb,
Data data)
|
protected int |
addDeleteMenu(StringBuffer sb,
Data data,
String workspaceFilter,
boolean isEnabled)
|
protected int |
addEditMenu(StringBuffer sb,
Data data,
boolean isEnabled,
boolean popup)
|
void |
addInfo(StringBuffer sb,
String label,
String value)
Adds an info in an info section |
void |
addInfoImage(StringBuffer sb,
String path)
Adds an info in an info section |
void |
addInfoText(StringBuffer sb,
String text)
Adds an info in an info section |
void |
addItem(StringBuffer sb,
boolean isEnabled,
String icon,
String label,
String url)
Adds a menu item |
void |
addItem(StringBuffer sb,
boolean isEnabled,
String icon,
String label,
String url,
boolean addRedirect)
Adds a menu item |
void |
addItem(StringBuffer sb,
boolean isEnabled,
String icon,
String label,
String url,
String css)
Adds a menu item wit css |
void |
addItemSeparator(StringBuffer sb)
Adds a menu item separator. |
void |
addItemWithConfirm(StringBuffer sb,
boolean isEnabled,
String icon,
String label,
String url,
String confirmMsg)
Adds a menu item with a confirm message dialog box. |
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. |
void |
addItemWithJSConfirm(StringBuffer sb,
boolean isEnabled,
String icon,
String label,
String func,
String confirmMsg)
Adds a menu item with a confirm message dialog box. |
void |
addItemWithOnclick(StringBuffer sb,
boolean isEnabled,
String icon,
String label,
String url,
String onclick)
Convenient method which delegates to addItemWithOnclick(StringBuffer, boolean, String, String, String, String, String) |
void |
addItemWithOnclick(StringBuffer sb,
boolean isEnabled,
String icon,
String label,
String url,
String onclick,
String title)
Adds a menu item with onclick value. |
void |
addItemWithPrompt(StringBuffer sb,
boolean isEnabled,
String icon,
String label,
String func,
String promptMsg,
String defaultValue)
Adds a menu item with an input dialog box. |
void |
addItemWithPrompt(StringBuffer sb,
boolean isEnabled,
String icon,
String label,
String url,
String promptMsg,
String param,
String defaultValue)
Adds a menu item with an input dialog box. |
void |
closeItem(StringBuffer sb,
String icon,
String label)
Close a menu item which has got an icon. |
void |
endInfoSection(StringBuffer sb)
Ends an info section |
void |
endSubSection(StringBuffer sb)
Ends an sub-section |
void |
openItem(StringBuffer sb,
boolean isEnabled)
Open a menu item which has got an icon. |
void |
setRedirect(String redirect)
|
void |
startInfoSection(StringBuffer sb,
String label,
String icon)
Starts an info section |
void |
startSubSection(StringBuffer sb,
String label,
String icon)
Starts an sub-section |
void |
startSubSection(StringBuffer sb,
String label,
String icon,
String ul)
Starts an sub-section |
Methods 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, getUserLang, getUserLocale, getWorkspace, getZone, glp, inflate, isAdmin, isInFrontOffice, isLogged, readObject, setBaseUrl, setContextPath, setCtxCategories, setCurrentCategory, setJcmsContext, setLoggedMember, setMethod, setParameterMap, setPortal, setPortalCategory, setPublication, setResourcePath, setUrl, setUserLang, setUserLocale, setWorkspace, writeObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient String redirect
protected transient String redirectJSNoCaddy
Constructor Detail |
---|
protected AbstractCtxMenu(JcmsJspContext ctxt)
Method Detail |
---|
protected int addEditMenu(StringBuffer sb, Data data, boolean isEnabled, boolean popup)
protected int addDeleteMenu(StringBuffer sb, Data data, String workspaceFilter, boolean isEnabled)
protected int addCaddyMenu(StringBuffer sb, Data data)
public void setRedirect(String redirect)
public void addItemSeparator(StringBuffer sb)
sb
- the StringBufferpublic void addItem(StringBuffer sb, boolean isEnabled, String icon, String label, 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(StringBuffer sb, boolean isEnabled, String icon, String label, String url, 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(StringBuffer sb, boolean isEnabled, String icon, String label, 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(StringBuffer sb, boolean isEnabled, String icon, String label, String url, 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(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String onclick, 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(StringBuffer sb, boolean isEnabled, String icon, String label, String url, 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(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String confirmMsg, 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(StringBuffer sb, boolean isEnabled, String icon, String label, String func, 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(StringBuffer sb, boolean isEnabled, String icon, String label, String url, String promptMsg, String param, 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(StringBuffer sb, boolean isEnabled, String icon, String label, String func, String promptMsg, 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(StringBuffer sb, String label, String icon)
sb
- the StringBufferlabel
- the label of the sectionicon
- the iconpublic void startSubSection(StringBuffer sb, String label, String icon, String ul)
sb
- the StringBufferlabel
- the label of the sectionicon
- the iconul
- the class on the ul subsection or nullpublic void endSubSection(StringBuffer sb)
sb
- the StringBufferpublic void startInfoSection(StringBuffer sb, String label, String icon)
sb
- the StringBufferlabel
- the label of the sectionicon
- the iconpublic void endInfoSection(StringBuffer sb)
sb
- the StringBufferpublic void addInfo(StringBuffer sb, String label, String value)
sb
- the StringBufferlabel
- the label of the infovalue
- the valuepublic void addInfoText(StringBuffer sb, String text)
sb
- the StringBuffertext
- the text to displaypublic void addInfoImage(StringBuffer sb, String path)
sb
- the StringBufferpath
- the path of the image to displaypublic void openItem(StringBuffer sb, boolean isEnabled)
sb
- the StringBufferisEnabled
- true if this item is enabled.public void closeItem(StringBuffer sb, String icon, String label)
sb
- the StringBuffericon
- the item iconlabel
- the label of the item
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |