|
||||||
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
public class CmsDialog
Provides methods for building the dialog windows of OpenCms.
Field Summary | |
---|---|
static int |
ACTION_CANCEL
Value for the action: cancel. |
static int |
ACTION_CLOSEPOPUP
Value for the action: close popup window. |
static int |
ACTION_CLOSEPOPUP_SAVE
Value for the action: save & close popup window. |
static int |
ACTION_CONFIRMED
Value for the action: confirmed. |
static int |
ACTION_CONTINUE
Value for the action: continue. |
static int |
ACTION_DEFAULT
Value for the action: default (show initial dialog form). |
static int |
ACTION_LOCKS_CONFIRMED
Value for the action: locks confirmed. |
static int |
ACTION_OK
Value for the action: ok. |
static int |
ACTION_REPORT_BEGIN
Value for the action: begin the report. |
static int |
ACTION_REPORT_END
Value for the action: end the report. |
static int |
ACTION_REPORT_UPDATE
Value for the action: update the report. |
static int |
ACTION_SET
Value for the action: button "set" clicked. |
static int |
ACTION_WAIT
Value for the action: wait (show please wait screen). |
protected static java.lang.String |
ATTRIBUTE_THROWABLE
Key name for the throwable attribute. |
static int |
BUTTON_ADVANCED
Constant for the "Advanced" button in the build button methods. |
static int |
BUTTON_BACK
Constant for the "Back" button in the build button methods. |
static int |
BUTTON_CANCEL
Constant for the "Cancel" button in the build button methods. |
static int |
BUTTON_CLOSE
Constant for the "Close" button in the build button methods. |
static int |
BUTTON_CONTINUE
Constant for the "Continue" button in the build button methods. |
static int |
BUTTON_DETAILS
Constant for the "Details" button in the build button methods. |
static int |
BUTTON_DISCARD
Constant for the "Discard" button in the build button methods (same function as "Cancel" button but different text on button. |
static int |
BUTTON_EDIT
Constant for the "Edit" button in the build button methods (same function as "Ok" button but different text on button. |
static int |
BUTTON_OK
Constant for the "OK" button in the build button methods. |
static int |
BUTTON_OK_NO_SUBMIT
Constant for the "OK" button in the build button methods (without form submission). |
static int |
BUTTON_SET
Constant for the "Set" button in the build button methods. |
static java.lang.String |
DIALOG_BACK
Request parameter value for the action: back. |
static java.lang.String |
DIALOG_CANCEL
Request parameter value for the action: cancel. |
static java.lang.String |
DIALOG_CONFIRMED
Request parameter value for the action: dialog confirmed. |
static java.lang.String |
DIALOG_CONTINUE
Request parameter value for the action: continue. |
static java.lang.String |
DIALOG_INITIAL
Request parameter value for the action: initial call. |
static java.lang.String |
DIALOG_LOCKS_CONFIRMED
Request parameter value for the action: dialog locks confirmed. |
static java.lang.String |
DIALOG_OK
Request parameter value for the action: ok. |
static java.lang.String |
DIALOG_SET
Request parameter value for the action: set. |
static java.lang.String |
DIALOG_WAIT
Request parameter value for the action: show please wait screen. |
static java.lang.String |
PARAM_ACTION
Request parameter name for the action. |
static java.lang.String |
PARAM_CLOSELINK
Request parameter name for the closelink. |
static java.lang.String |
PARAM_DIALOGTYPE
Request parameter name for the dialog type. |
static java.lang.String |
PARAM_ERRORSTACK
Request parameter name for the error stack. |
static java.lang.String |
PARAM_FILE
Request parameter name for the file. |
static java.lang.String |
PARAM_FRAMENAME
Request parameter name for the frame name. |
static java.lang.String |
PARAM_ISPOPUP
Request parameter name for the "is popup" flag. |
static java.lang.String |
PARAM_LOCK
Request parameter name for the lock. |
static java.lang.String |
PARAM_MESSAGE
Request parameter name for the error message. |
static java.lang.String |
PARAM_ORIGINALPARAMS
Request parameter name for the originalparams. |
static java.lang.String |
PARAM_PREACTIONDONE
Request parameter name for the preactiondone. |
static java.lang.String |
PARAM_REDIRECT
Request parameter name for the redirect flag. |
static java.lang.String |
PARAM_RESOURCE
Request parameter name for the resource. |
static java.lang.String |
PARAM_TARGET
Request parameter name for the target. |
static java.lang.String |
PARAM_THREAD
Request parameter name for the thread id. |
static java.lang.String |
PARAM_THREAD_HASNEXT
Request parameter name for indicating if another thread is following the current one. |
static java.lang.String |
PARAM_TITLE
Request parameter name for the dialog title. |
static java.lang.String |
REPORT_BEGIN
Request parameter value for the action: begin the report. |
static java.lang.String |
REPORT_END
Request parameter value for the action: end the report. |
static java.lang.String |
REPORT_UPDATE
Request parameter value for the action: update the report. |
Fields inherited from class org.opencms.workplace.tools.CmsToolDialog |
---|
PARAM_BASE, PARAM_FORCE, PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW |
Constructor Summary | |
---|---|
CmsDialog(CmsJspActionElement jsp)
Public constructor with JSP action element. |
|
CmsDialog(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Public constructor with JSP variables. |
Method Summary | |
---|---|
void |
actionCloseDialog()
Used to close the current JSP dialog. |
protected java.lang.String |
appendDelimiter(java.lang.String attribute)
Appends a space char. between tag attributes. |
java.lang.String |
buildAjaxResultContainer(java.lang.String title)
Returns the html code to build the ajax report container. |
protected java.lang.String |
buildAjaxWaitMessage()
Returns ajax wait message. |
java.lang.String |
buildLockAdditionalOptions()
Override to display additional options in the lock dialog. |
java.lang.String |
buildLockConfirmationMessageJS()
Returns the html code to build the confirmation messages. |
java.lang.String |
buildLockDialog()
Returns the html code to build the lock dialog. |
java.lang.String |
buildLockDialog(CmsLockFilter nonBlockingFilter,
CmsLockFilter blockingFilter,
int hiddenTimeout,
boolean includeRelated)
Returns the html code to build the lock dialog. |
java.lang.String |
buildLockHeaderBox()
Returns the html code to build the header box. |
protected boolean |
checkResourcePermissions(CmsPermissionSet required,
boolean neededForFolder)
Checks if the permissions of the current user on the resource to use in the dialog are sufficient. |
protected boolean |
checkResourcePermissions(CmsPermissionSet required,
boolean neededForFolder,
CmsMessageContainer errorMessage)
Checks if the permissions of the current user on the resource to use in the dialog are sufficient. |
protected java.lang.String |
computeCurrentFolder()
Returns the full path of the current workplace folder. |
java.lang.String |
dialog(int segment,
java.lang.String attributes)
Builds the outer dialog window border. |
java.lang.String |
dialogBlock(int segment,
java.lang.String headline,
boolean error)
Builds a block with 3D border and optional subheadline in the dialog content area. |
java.lang.String |
dialogBlockEnd()
Builds the end HTML for a block with 3D border in the dialog content area. |
java.lang.String |
dialogBlockStart(java.lang.String headline)
Builds the start HTML for a block with 3D border and optional subheadline in the dialog content area. |
java.lang.String |
dialogButtonRow(int segment)
Builds the button row under the dialog content area without the buttons. |
java.lang.String |
dialogButtonRowEnd()
Builds the end of the button row under the dialog content area without the buttons. |
java.lang.String |
dialogButtonRowStart()
Builds the start of the button row under the dialog content area without the buttons. |
java.lang.String |
dialogButtons(int[] buttons,
java.lang.String[] attributes)
Builds the html for the button row under the dialog content area, including buttons. |
java.lang.String |
dialogButtonsClose()
Builds a button row with a single "close" button. |
java.lang.String |
dialogButtonsClose(java.lang.String closeAttribute)
Builds a button row with a single "close" button. |
java.lang.String |
dialogButtonsCloseDetails(java.lang.String closeAttribute,
java.lang.String detailsAttribute)
Builds a button row with a "close" and a "details" button. |
protected void |
dialogButtonsHtml(java.lang.StringBuffer result,
int button,
java.lang.String attribute)
Renders the HTML for a single input button of a specified type. |
java.lang.String |
dialogButtonsOk()
Builds a button row with a single "ok" button. |
java.lang.String |
dialogButtonsOk(java.lang.String okAttribute)
Builds a button row with a single "ok" button. |
java.lang.String |
dialogButtonsOkCancel()
Builds a button row with an "ok" and a "cancel" button. |
java.lang.String |
dialogButtonsOkCancel(java.lang.String okAttributes,
java.lang.String cancelAttributes)
Builds a button row with an "ok" and a "cancel" button. |
java.lang.String |
dialogButtonsOkCancelAdvanced(java.lang.String okAttributes,
java.lang.String cancelAttributes,
java.lang.String advancedAttributes)
Builds a button row with an "ok", a "cancel" and an "advanced" button. |
java.lang.String |
dialogButtonsSetOkCancel(java.lang.String setAttributes,
java.lang.String okAttributes,
java.lang.String cancelAttributes)
Builds a button row with a "set", an "ok", and a "cancel" button. |
java.lang.String |
dialogContent(int segment,
java.lang.String title)
Builds the content area of the dialog window. |
java.lang.String |
dialogContentEnd()
Returns the end html for the content area of the dialog window. |
java.lang.String |
dialogContentStart(java.lang.String title)
Returns the start html for the content area of the dialog window. |
java.lang.String |
dialogEnd()
Returns the end html for the outer dialog window border. |
java.lang.String |
dialogHead(java.lang.String title)
Builds the title of the dialog window. |
java.lang.String |
dialogHorizontalSpacer(int width)
Builds an invisible horizontal spacer with the specified width. |
java.lang.String |
dialogLockButtons()
Builds the necessary button row. |
java.lang.String |
dialogRow(int segment)
Builds a dialog line without break (display: block). |
java.lang.String |
dialogRowEnd()
Builds the end of a dialog line without break (display: block). |
java.lang.String |
dialogRowStart()
Builds the start of a dialog line without break (display: block). |
java.lang.String |
dialogScriptSubmit()
Builds the standard javascript for submitting the dialog. |
java.lang.String |
dialogSeparator()
Builds a horizontal separator line in the dialog content area. |
java.lang.String |
dialogSpacer()
Builds a space between two elements in the dialog content area. |
java.lang.String |
dialogStart()
Returns the start html for the outer dialog window border. |
java.lang.String |
dialogStart(java.lang.String attributes)
Returns the start html for the outer dialog window border. |
java.lang.String |
dialogSubheadline(java.lang.String headline)
Builds a subheadline in the dialog content area. |
java.lang.String |
dialogToggleStart(java.lang.String headline,
java.lang.String id,
boolean show)
Builds the HTML code to fold and unfold a white-box. |
java.lang.String |
dialogWhiteBox(int segment)
Builds a white box in the dialog content area. |
java.lang.String |
dialogWhiteBoxEnd()
Builds the end of a white box in the dialog content area. |
java.lang.String |
dialogWhiteBoxStart()
Builds the start of a white box in the dialog content area. |
int |
getAction()
Returns the action value. |
protected java.lang.String |
getAdministrationBackLink()
Returns the link URL to get back one folder in the administration view. |
java.lang.String |
getCancelAction()
Returns the action to be carried out after a click on the cancel button.. |
java.lang.String |
getDialogRealUri()
Returns the http URI of the current dialog, to be used as value for the "action" attribute of a html form. |
java.lang.String |
getDialogUri()
Returns the http URI of the current dialog, to be used as value for the "action" attribute of a html form. |
java.lang.String |
getOnlineHelpUriCustom()
Returns the custom mapping for the online help. |
java.lang.String |
getParamAction()
Returns the value of the action parameter, or null if this parameter was not provided. |
java.lang.String |
getParamCloseLink()
Returns the value of the close link parameter, or null if this parameter was not provided. |
java.lang.String |
getParamDialogtype()
Returns the value of the dialog type parameter, or null if this parameter was not provided. |
java.lang.String |
getParamFramename()
Returns the value of the frame name parameter. |
java.lang.String |
getParamIsPopup()
Returns the is popup parameter. |
java.lang.String |
getParamMessage()
Returns the value of the message parameter, or null if this parameter was not provided. |
java.lang.String |
getParamOriginalParams()
Returns the value of the original parameters parameter. |
java.lang.String |
getParamPreActionDone()
Returns the value of the preaction done parameter. |
java.lang.String |
getParamRedirect()
Returns the value of the redirect flag parameter. |
java.lang.String |
getParamResource()
Returns the value of the file parameter, or null if this parameter was not provided. |
java.lang.String |
getParamTitle()
Returns the value of the title parameter, or null if this parameter was not provided. |
java.lang.String |
getState()
Gets a formatted file state string. |
boolean |
hasCorrectLockstate()
Checks if the current resource has lock state exclusive or inherited. |
boolean |
hasSiblings()
Checks if this resource has siblings. |
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 |
htmlStart(java.lang.String helpUrl,
java.lang.String title)
Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type. |
java.lang.String |
htmlStartStyle(java.lang.String title,
java.lang.String stylesheet)
Builds the start html of the page, including setting of DOCTYPE, inserting a header with the content-type and choosing an individual style sheet. |
void |
includeErrorpage(CmsWorkplace wp,
java.lang.Throwable t)
Displays the throwable on the error page and logs the error. |
static CmsDialog |
initCmsDialog(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Returns an initialized CmsDialog instance that is read from the request attributes. |
protected void |
initWorkplaceRequestValues(CmsWorkplaceSettings settings,
javax.servlet.http.HttpServletRequest request)
Analyzes the request for workplace parameters and adjusts the workplace settings accordingly. |
boolean |
isPopup()
Returns the "isPopup" flag. |
boolean |
isPreEditor()
Returns if the dialog is called in direct edit mode before the editor is opened. |
java.lang.String |
pageHtml(int segment,
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 |
pageHtml(int segment,
java.lang.String helpUrl,
java.lang.String title)
Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type. |
protected void |
setAction(int value)
Sets the action value. |
void |
setOnlineHelpUriCustom(java.lang.String uri)
Set the custom mapping for the online help. |
void |
setParamAction(java.lang.String value)
Sets the value of the action parameter. |
void |
setParamCloseLink(java.lang.String value)
Sets the value of the close link parameter. |
void |
setParamDialogtype(java.lang.String value)
Sets the value of the dialog type parameter. |
void |
setParamFramename(java.lang.String value)
Sets the value of the frame name parameter. |
void |
setParamIsPopup(java.lang.String value)
Sets the is popup parameter. |
void |
setParamMessage(java.lang.String value)
Sets the value of the message parameter. |
void |
setParamOriginalParams(java.lang.String paramOriginalParams)
Sets the value of the original parameters parameter. |
void |
setParamPreActionDone(java.lang.String paramPreActionDone)
Sets the value of the preaction done parameter. |
void |
setParamRedirect(java.lang.String redirect)
Sets the value of the redirect flag parameter. |
void |
setParamResource(java.lang.String value)
Sets the value of the file parameter. |
void |
setParamTitle(java.lang.String value)
Sets the value of the title 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_CANCEL
public static final int ACTION_CLOSEPOPUP
public static final int ACTION_CLOSEPOPUP_SAVE
public static final int ACTION_CONFIRMED
public static final int ACTION_CONTINUE
public static final int ACTION_DEFAULT
public static final int ACTION_LOCKS_CONFIRMED
public static final int ACTION_OK
public static final int ACTION_REPORT_BEGIN
public static final int ACTION_REPORT_END
public static final int ACTION_REPORT_UPDATE
public static final int ACTION_SET
public static final int ACTION_WAIT
public static final int BUTTON_ADVANCED
public static final int BUTTON_BACK
public static final int BUTTON_CANCEL
public static final int BUTTON_CLOSE
public static final int BUTTON_CONTINUE
public static final int BUTTON_DETAILS
public static final int BUTTON_DISCARD
public static final int BUTTON_EDIT
public static final int BUTTON_OK
public static final int BUTTON_OK_NO_SUBMIT
public static final int BUTTON_SET
public static final java.lang.String DIALOG_BACK
public static final java.lang.String DIALOG_CANCEL
public static final java.lang.String DIALOG_CONFIRMED
public static final java.lang.String DIALOG_CONTINUE
public static final java.lang.String DIALOG_INITIAL
public static final java.lang.String DIALOG_LOCKS_CONFIRMED
public static final java.lang.String DIALOG_OK
public static final java.lang.String DIALOG_SET
public static final java.lang.String DIALOG_WAIT
public static final java.lang.String PARAM_ACTION
public static final java.lang.String PARAM_CLOSELINK
public static final java.lang.String PARAM_DIALOGTYPE
public static final java.lang.String PARAM_ERRORSTACK
public static final java.lang.String PARAM_FILE
public static final java.lang.String PARAM_FRAMENAME
public static final java.lang.String PARAM_ISPOPUP
public static final java.lang.String PARAM_LOCK
public static final java.lang.String PARAM_MESSAGE
public static final java.lang.String PARAM_ORIGINALPARAMS
public static final java.lang.String PARAM_PREACTIONDONE
public static final java.lang.String PARAM_REDIRECT
public static final java.lang.String PARAM_RESOURCE
public static final java.lang.String PARAM_TARGET
public static final java.lang.String PARAM_THREAD
public static final java.lang.String PARAM_THREAD_HASNEXT
public static final java.lang.String PARAM_TITLE
public static final java.lang.String REPORT_BEGIN
public static final java.lang.String REPORT_END
public static final java.lang.String REPORT_UPDATE
protected static final java.lang.String ATTRIBUTE_THROWABLE
Constructor Detail |
---|
public CmsDialog(CmsJspActionElement jsp)
jsp
- an initialized JSP action elementpublic CmsDialog(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 static CmsDialog initCmsDialog(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
This method is used by dialog elements. The dialog elements do not initialize their own workplace class, but use the initialized instance of the "master" class. This is required to ensure that parameters of the "master" class can properly be kept on the dialog elements.
To prevent null pointer exceptions, an empty dialog is returned if nothing is found in the request attributes.
context
- the JSP page contextreq
- the JSP requestres
- the JSP response
public void actionCloseDialog() throws javax.servlet.jsp.JspException
This method tries to include the URI stored in the workplace settings. This URI is determined by the frame name, which has to be set in the frame name parameter.
javax.servlet.jsp.JspException
- if including an element failspublic java.lang.String buildAjaxResultContainer(java.lang.String title)
title
- the title of the report box
public java.lang.String buildLockAdditionalOptions()
public java.lang.String buildLockConfirmationMessageJS()
public java.lang.String buildLockDialog() throws CmsException
CmsException
- if something goes wrongpublic java.lang.String buildLockDialog(CmsLockFilter nonBlockingFilter, CmsLockFilter blockingFilter, int hiddenTimeout, boolean includeRelated) throws CmsException
nonBlockingFilter
- the filter to get all non blocking locksblockingFilter
- the filter to get all blocking lockshiddenTimeout
- the maximal number of milliseconds the dialog will be hiddenincludeRelated
- indicates if the report should include related resources
CmsException
- if something goes wrongpublic java.lang.String buildLockHeaderBox() throws CmsException
CmsException
- if something goes wrongpublic java.lang.String dialog(int segment, java.lang.String attributes)
segment
- the HTML segment (START / END)attributes
- optional additional attributes for the opening dialog table
public java.lang.String dialogBlock(int segment, java.lang.String headline, boolean error)
segment
- the HTML segment (START / END)headline
- the headline String for the blockerror
- if true, an error block will be created
public java.lang.String dialogBlockEnd()
public java.lang.String dialogBlockStart(java.lang.String headline)
headline
- the headline String for the block
public java.lang.String dialogButtonRow(int segment)
segment
- the HTML segment (START / END)
public java.lang.String dialogButtonRowEnd()
public java.lang.String dialogButtonRowStart()
public java.lang.String dialogButtons(int[] buttons, java.lang.String[] attributes)
buttons
- array of constants of which buttons to include in the rowattributes
- array of Strings for additional button attributes
public java.lang.String dialogButtonsClose()
public java.lang.String dialogButtonsClose(java.lang.String closeAttribute)
closeAttribute
- additional attributes for the "close" button
public java.lang.String dialogButtonsCloseDetails(java.lang.String closeAttribute, java.lang.String detailsAttribute)
closeAttribute
- additional attributes for the "close" buttondetailsAttribute
- additional attributes for the "details" button
public java.lang.String dialogButtonsOk()
public java.lang.String dialogButtonsOk(java.lang.String okAttribute)
okAttribute
- additional attributes for the "ok" button
public java.lang.String dialogButtonsOkCancel()
public java.lang.String dialogButtonsOkCancel(java.lang.String okAttributes, java.lang.String cancelAttributes)
okAttributes
- additional attributes for the "ok" buttoncancelAttributes
- additional attributes for the "cancel" button
public java.lang.String dialogButtonsOkCancelAdvanced(java.lang.String okAttributes, java.lang.String cancelAttributes, java.lang.String advancedAttributes)
okAttributes
- additional attributes for the "ok" buttoncancelAttributes
- additional attributes for the "cancel" buttonadvancedAttributes
- additional attributes for the "advanced" button
public java.lang.String dialogButtonsSetOkCancel(java.lang.String setAttributes, java.lang.String okAttributes, java.lang.String cancelAttributes)
setAttributes
- additional attributes for the "set" buttonokAttributes
- additional attributes for the "ok" buttoncancelAttributes
- additional attributes for the "cancel" button
public java.lang.String dialogContent(int segment, java.lang.String title)
segment
- the HTML segment (START / END)title
- the title String for the dialog window
public java.lang.String dialogContentEnd()
public java.lang.String dialogContentStart(java.lang.String title)
title
- the title for the dialog
public java.lang.String dialogEnd()
public java.lang.String dialogHead(java.lang.String title)
title
- the title String for the dialog window
public java.lang.String dialogHorizontalSpacer(int width)
width
- the width of the spacer in pixels
public java.lang.String dialogLockButtons()
public java.lang.String dialogRow(int segment)
segment
- the HTML segment (START / END)
public java.lang.String dialogRowEnd()
public java.lang.String dialogRowStart()
public java.lang.String dialogScriptSubmit()
dialogScriptSubmit
in class CmsToolDialog
public java.lang.String dialogSeparator()
public java.lang.String dialogSpacer()
public java.lang.String dialogStart()
public java.lang.String dialogStart(java.lang.String attributes)
attributes
- optional html attributes to insert
public java.lang.String dialogSubheadline(java.lang.String headline)
headline
- the desired headline string
public java.lang.String dialogToggleStart(java.lang.String headline, java.lang.String id, boolean show)
headline
- the heading to displayid
- the id of the toggleshow
- true if the white box is open at the beginning
public java.lang.String dialogWhiteBox(int segment)
segment
- the HTML segment (START / END)
public java.lang.String dialogWhiteBoxEnd()
public java.lang.String dialogWhiteBoxStart()
public int getAction()
The action value is used on JSP pages to select the proper action in a large "switch" statement.
public java.lang.String getCancelAction()
public java.lang.String getDialogRealUri()
This URI is the real one.
public java.lang.String getDialogUri()
This URI could not be really the real one...
public java.lang.String getOnlineHelpUriCustom()
public java.lang.String getParamAction()
The action parameter is very important,
it will select the dialog action to perform.
The value of the getAction()
method will be
initialized from the action parameter.
public java.lang.String getParamCloseLink()
public java.lang.String getParamDialogtype()
This parameter is very important. It must match to the localization keys, e.g. "copy" for the copy dialog.
This parameter must be set manually by the subclass during first initialization.
public java.lang.String getParamFramename()
public java.lang.String getParamIsPopup()
Use this parameter to indicate that the dialog is shown in a popup window.
public java.lang.String getParamMessage()
The message parameter is used on dialogs to show any text message.
public java.lang.String getParamOriginalParams()
This stores the request parameter values from a previous dialog, if necessary.
public java.lang.String getParamPreActionDone()
public java.lang.String getParamRedirect()
public java.lang.String getParamResource()
The file parameter selects the file on which the dialog action is to be performed.
public java.lang.String getParamTitle()
This parameter is used to build the title of the dialog. It is a parameter so that the title can be passed to included elements.
public java.lang.String getState() throws CmsException
CmsException
- if something goes wrongpublic boolean hasCorrectLockstate()
This is used to determine whether the dialog shows the option to delete all siblings of the resource or not.
public boolean hasSiblings()
public java.lang.String htmlStart()
public java.lang.String htmlStart(java.lang.String helpUrl)
This overloads the default method of the parent class.
htmlStart
in class CmsWorkplace
helpUrl
- the key for the online help to include on the page
public java.lang.String htmlStart(java.lang.String helpUrl, java.lang.String title)
helpUrl
- the key for the online help to include on the pagetitle
- the title for the page
public java.lang.String htmlStartStyle(java.lang.String title, java.lang.String stylesheet)
title
- the title for the pagestylesheet
- the style sheet to include
public void includeErrorpage(CmsWorkplace wp, java.lang.Throwable t) throws javax.servlet.jsp.JspException
wp
- the workplace classt
- the throwable to be displayed on the error page
javax.servlet.jsp.JspException
- if the include of the error page jsp failspublic boolean isPopup()
public boolean isPreEditor()
public java.lang.String pageHtml(int segment, java.lang.String helpUrl)
This overloads the default method of the parent class.
pageHtml
in class CmsWorkplace
segment
- the HTML segment (START / END)helpUrl
- the url for the online help to include on the page
public java.lang.String pageHtml(int segment, java.lang.String helpUrl, java.lang.String title)
This overloads the default method of the parent class.
segment
- the HTML segment (START / END)helpUrl
- the url for the online help to include on the pagetitle
- the title for the page
public void setOnlineHelpUriCustom(java.lang.String uri)
This value will be set to a javascript variable called onlineHelpUriCustom. If it is set, the top.head javascript for the online help will use this value.
This method should be called from
,
initWorkplaceRequestValues(CmsWorkplaceSettings, HttpServletRequest)
or from the jsp if the dialog class is used for several actions.
It should be used whenever the online help mapping does not work (due to jsp - forwards).CmsWorkplace.initWorkplaceMembers(CmsJspActionElement)
uri
- the left hand value in mapping.properties for the online help pagespublic void setParamAction(java.lang.String value)
value
- the value to setpublic void setParamCloseLink(java.lang.String value)
value
- the value to setpublic void setParamDialogtype(java.lang.String value)
value
- the value to setpublic void setParamFramename(java.lang.String value)
value
- the value to setpublic void setParamIsPopup(java.lang.String value)
value
- the is popup parameter valuepublic void setParamMessage(java.lang.String value)
value
- the value to setpublic void setParamOriginalParams(java.lang.String paramOriginalParams)
paramOriginalParams
- the value of the original parameters parameterpublic void setParamPreActionDone(java.lang.String paramPreActionDone)
paramPreActionDone
- the value of the preaction done parameterpublic void setParamRedirect(java.lang.String redirect)
redirect
- the value of the redirect flag parameterpublic void setParamResource(java.lang.String value)
value
- the value to setpublic void setParamTitle(java.lang.String value)
value
- the value to setprotected java.lang.String appendDelimiter(java.lang.String attribute)
attribute
- a tag attribute
protected java.lang.String buildAjaxWaitMessage()
protected boolean checkResourcePermissions(CmsPermissionSet required, boolean neededForFolder)
Automatically generates a CmsMessageContainer object with an error message and stores it in the users session.
required
- the required permissions for the dialogneededForFolder
- if true, the permissions are required for the parent folder of the resource (e.g. for editors)
protected boolean checkResourcePermissions(CmsPermissionSet required, boolean neededForFolder, CmsMessageContainer errorMessage)
Automatically generates a CmsMessageContainer object with an error message and stores it in the users session.
required
- the required permissions for the dialogneededForFolder
- if true, the permissions are required for the parent folder of the resource (e.g. for editors)errorMessage
- the message container that is stored in the session in case the permissions are not sufficient
protected java.lang.String computeCurrentFolder()
protected void dialogButtonsHtml(java.lang.StringBuffer result, int button, java.lang.String attribute)
result
- a string buffer where the rendered HTML gets appended tobutton
- a integer key to identify the buttonattribute
- an optional string with possible tag attributes, or nullprotected java.lang.String getAdministrationBackLink()
protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request)
CmsWorkplace
initWorkplaceRequestValues
in class CmsToolDialog
settings
- the workplace settingsrequest
- the current requestCmsWorkplace.initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest)
protected void setAction(int value)
value
- the action value
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |