|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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 | |
---|---|
static String |
DISABLED
|
static char |
FLAG_CADDY
|
static char |
FLAG_DELETE
|
static char |
FLAG_EDIT
|
static char |
FLAG_EXPORT
|
static char |
FLAG_SEPARATOR
|
static int |
MENU_DISABLED
|
static int |
MENU_ENABLED
|
static int |
MENU_SKIPPED
|
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, parameterMap, portal, portalCategory, pub, resourcePath, url, userLang, userLocale, workspace, zone |
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 |
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 that delegater 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 |
---|
debug, getBaseUrl, getCaddy, getContextPath, getCtxCategories, getCurrentCategory, getLoggedMember, getParameterMap, getPortal, getPortalCategory, getPublication, getResourcePath, getUrl, getUserLang, getUserLocale, getWorkspace, getZone, glp, isAdmin, isInFrontOffice, isLogged, setBaseUrl, setContextPath, setCtxCategories, setCurrentCategory, setJcmsContext, setLoggedMember, setParameterMap, setPortal, setPortalCategory, setPublication, setResourcePath, setUrl, setUserLang, setUserLocale, setWorkspace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DISABLED
public static final char FLAG_EDIT
public static final char FLAG_DELETE
public static final char FLAG_CADDY
public static final char FLAG_EXPORT
public static final char FLAG_SEPARATOR
public static final int MENU_SKIPPED
public static final int MENU_ENABLED
public static final int MENU_DISABLED
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 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, 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)
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 itempublic void setRedirect(String redirect)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |