|
||||||
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 java.lang.String |
DIALOG_SWITCHTAB
Request parameter value for the action: switch the tab. |
static java.lang.String |
PARAM_SETPRESSED
Name of the request parameter for the set button pressed flag. |
static java.lang.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 | |
---|---|
java.lang.String |
dialogTabContent(int segment,
java.lang.String title,
java.lang.String attributes)
Builds the tab content area of the dialog window. |
java.lang.String |
dialogTabContentEnd()
Returns the end html for the tab content area of the dialog window. |
java.lang.String |
dialogTabContentStart(java.lang.String title)
Returns the start html for the tab content area of the dialog window. |
java.lang.String |
dialogTabContentStart(java.lang.String title,
java.lang.String attributes)
Returns the start html for the tab content area of the dialog window. |
java.lang.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. |
java.lang.String |
getActiveTabName()
Returns the localized name of the currently active tab. |
java.lang.String |
getParamSetPressed()
Returns the value of the setpressed parameter. |
java.lang.String |
getParamTab()
Returns the value of the tab parameter. |
abstract java.util.List |
getTabParameterOrder()
Returns the order of the parameter prefixes for each tab. |
abstract java.util.List |
getTabs()
Returns a list with localized Strings representing the names of the tabs. |
java.lang.String |
htmlStart()
Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type. |
java.lang.String |
htmlStart(java.lang.String helpUrl)
Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type. |
java.lang.String |
paramsAsHidden()
Returns all initialized parameters of the current workplace class as hidden field tags that can be inserted in a form. |
void |
setParamSetPressed(java.lang.String value)
Sets the value of the setpressed parameter. |
void |
setParamTab(java.lang.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 java.lang.String DIALOG_SWITCHTAB
public static final java.lang.String PARAM_SETPRESSED
public static final java.lang.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 java.lang.String dialogTabContent(int segment, java.lang.String title, java.lang.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 java.lang.String dialogTabContentEnd()
public java.lang.String dialogTabContentStart(java.lang.String title)
title
- the title for the dialog
public java.lang.String dialogTabContentStart(java.lang.String title, java.lang.String attributes)
title
- the title for the dialogattributes
- additional attributes for the content <div> area of the tab dialog
public java.lang.String dialogTabRow()
public int getActiveTab()
This method has to be called once in initWorkplaceRequestValues after filling the request parameters.
public java.lang.String getActiveTabName()
public java.lang.String getParamSetPressed()
public java.lang.String getParamTab()
public abstract java.util.List 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 java.util.List getTabs()
public java.lang.String htmlStart()
This overloads the default method of the parent class.
htmlStart
in class CmsDialog
public java.lang.String htmlStart(java.lang.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 java.lang.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(java.lang.String value)
value
- the value to setpublic void setParamTab(java.lang.String value)
value
- the value to set
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |