|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.workplace.CmsWorkplace
org.opencms.workplace.tools.CmsToolDialog
org.opencms.workplace.CmsDialog
org.opencms.workplace.CmsTabDialog
public abstract class CmsTabDialog
Provides methods for tab styled dialogs.
Extend this class in order to create a tab styled dialog and provide the methods getTabs() and getTabParameterOrder() in the new dialog class which should return lists which represent the tabs of the dialog.
This class is used for the following dialogs:
Field Summary | |
---|---|
static int |
ACTION_SWITCHTAB
Value for the action: switch the tab. |
static String |
DIALOG_SWITCHTAB
Request parameter value for the action: switch the tab. |
static String |
PARAM_SETPRESSED
Name of the request parameter for the set button pressed flag. |
static String |
PARAM_TAB
Name of the request parameter for the current tab. |
Fields inherited from class org.opencms.workplace.tools.CmsToolDialog |
---|
PARAM_BASE, PARAM_FORCE, PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW |
Constructor Summary | |
---|---|
CmsTabDialog(CmsJspActionElement jsp)
Public constructor. |
|
CmsTabDialog(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Public constructor with JSP variables. |
Method Summary | |
---|---|
String |
dialogTabContent(int segment,
String title,
String attributes)
Builds the tab content area of the dialog window. |
String |
dialogTabContentEnd()
Returns the end html for the tab content area of the dialog window. |
String |
dialogTabContentStart(String title)
Returns the start html for the tab content area of the dialog window. |
String |
dialogTabContentStart(String title,
String attributes)
Returns the start html for the tab content area of the dialog window. |
String |
dialogTabRow()
Builds the html for the tab row of the tab dialog. |
int |
getActiveTab()
Returns the number of the currently active tab depending on the request parameter. |
String |
getActiveTabName()
Returns the localized name of the currently active tab. |
String |
getParamSetPressed()
Returns the value of the setpressed parameter. |
String |
getParamTab()
Returns the value of the tab parameter. |
abstract List<String> |
getTabParameterOrder()
Returns the order of the parameter prefixes for each tab. |
abstract List<String> |
getTabs()
Returns a list with localized Strings representing the names of the tabs. |
String |
htmlStart()
Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type. |
String |
htmlStart(String helpUrl)
Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type. |
String |
paramsAsHidden()
Returns all initialized parameters of the current workplace class as hidden field tags that can be inserted in a form. |
void |
setParamSetPressed(String value)
Sets the value of the setpressed parameter. |
void |
setParamTab(String value)
Sets the value of the tab parameter. |
Methods inherited from class org.opencms.workplace.tools.CmsToolDialog |
---|
dialogTitle, getAdminTool, getCurrentToolPath, getParamBase, getParamForce, getParamPath, getParamRoot, getParamStyle, getParentPath, getToolManager, iconsBlockArea, iconsBlockAreaEnd, iconsBlockAreaStart, initAdminTool, pageBody, pageHtmlStyle, setParamBase, setParamForce, setParamPath, setParamRoot, setParamStyle, useNewStyle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ACTION_SWITCHTAB
public static final String DIALOG_SWITCHTAB
public static final String PARAM_SETPRESSED
public static final String PARAM_TAB
Constructor Detail |
---|
public CmsTabDialog(CmsJspActionElement jsp)
jsp
- an initialized JSP action elementpublic CmsTabDialog(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
context
- the JSP page contextreq
- the JSP requestres
- the JSP responseMethod Detail |
---|
public String dialogTabContent(int segment, String title, String attributes)
segment
- the HTML segment (START / END)title
- the title String for the dialog windowattributes
- additional attributes for the content <div> area of the tab dialog
public String dialogTabContentEnd()
public String dialogTabContentStart(String title)
title
- the title for the dialog
public String dialogTabContentStart(String title, String attributes)
title
- the title for the dialogattributes
- additional attributes for the content <div> area of the tab dialog
public String dialogTabRow()
public int getActiveTab()
This method has to be called once in initWorkplaceRequestValues after filling the request parameters.
public String getActiveTabName()
public String getParamSetPressed()
public String getParamTab()
public abstract List<String> getTabParameterOrder()
For example, all parameters stored in tab 1 have the prefix "Tab1", i.e. the getter and setter methods must be getParamTab1MyParameterName().
To change the tab order, simply change the order in the String array and in the generated tab list.
getTabs()
public abstract List<String> getTabs()
public String htmlStart()
This overloads the default method of the parent class.
htmlStart
in class CmsDialog
public String htmlStart(String helpUrl)
This overloads the default method of the parent class.
htmlStart
in class CmsDialog
helpUrl
- the key for the online help to include on the page
public String paramsAsHidden()
This overwrites the method in CmsWorkplace because for each tab, only the hidden parameters of the non displayed tabs are added.
paramsAsHidden
in class CmsWorkplace
public void setParamSetPressed(String value)
value
- the value to setpublic void setParamTab(String value)
value
- the value to set
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |