Class CmsDialog
- Direct Known Subclasses:
A_CmsAjaxGallery
,CmsDialogCopyLanguage
,CmsDialogElements
,CmsEditorBase
,CmsExplorerDialog
,CmsLoginUserAgreement
,CmsOpenGallery
,CmsOpenGallery
,CmsPreEditorAction
- Since:
- 6.0.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Value for the action: cancel.static final int
Value for the action: close popup window.static final int
Value for the action: save & close popup window.static final int
Value for the action: confirmed.static final int
Value for the action: continue.static final int
Value for the action: default (show initial dialog form).static final int
Value for the action: locks confirmed.static final int
Value for the action: ok.static final int
Value for the action: begin the report.static final int
Value for the action: end the report.static final int
Value for the action: update the report.static final int
Value for the action: button "set" clicked.static final int
Value for the action: wait (show please wait screen).protected static final String
Key name for the throwable attribute.static final int
Constant for the "Advanced" button in the build button methods.static final int
Constant for the "Back" button in the build button methods.static final int
Constant for the "Cancel" button in the build button methods.static final int
Constant for the "Close" button in the build button methods.static final int
Constant for the "Continue" button in the build button methods.static final int
Constant for the "Details" button in the build button methods.static final int
Constant for the "Discard" button in the build button methods (same function as "Cancel" button but different text on button.static final int
Constant for the "Edit" button in the build button methods (same function as "Ok" button but different text on button.static final int
Constant for the "OK" button in the build button methods.static final int
Constant for the "OK" button in the build button methods (without form submission).static final int
Constant for the "Set" button in the build button methods.static final String
Request parameter value for the action: back.static final String
Request parameter value for the action: cancel.static final String
Request parameter value for the action: dialog confirmed.static final String
Request parameter value for the action: continue.static final String
Request parameter value for the action: initial call.static final String
Request parameter value for the action: dialog locks confirmed.static final String
Request parameter value for the action: ok.static final String
Request parameter value for the action: set.static final String
Request parameter value for the action: show please wait screen.static final String
Request parameter name for the action.static final String
Request parameter name for the action.static final String
Request parameter name for the closelink.static final String
Request parameter name for the dialog type.static final String
Request parameter name for the error stack.static final String
Request parameter name for the file.static final String
Request parameter name for the frame name.static final String
Request parameter name for the "is popup" flag.static final String
Request parameter name for the lock.static final String
Request parameter name for the error message.static final String
Request parameter name for the originalparams.static final String
Request parameter name for the preactiondone.static final String
Request parameter name for the redirect flag.static final String
Request parameter name for the resource.static final String
Request parameter name for the target.static final String
Request parameter name for the thread id.static final String
Request parameter name for indicating if another thread is following the current one.static final String
Request parameter name for the dialog title.static final String
Request parameter value for the action: begin the report.static final String
Request parameter value for the action: end the report.static final String
Request parameter value for the action: update the report.Fields inherited from class org.opencms.workplace.tools.CmsToolDialog
PARAM_ADMIN_PROJECT, PARAM_BASE, PARAM_FORCE, PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW
Fields inherited from class org.opencms.workplace.CmsWorkplace
DEBUG, DEFAULT_DATE_STRING, DEFAULT_LANGUAGE, DEFAULT_LOCALE, DIALOG_PATH_COMMON, FILE_DIALOG_CLOSE, FILE_DIALOG_SCREEN_CONFIRM, FILE_DIALOG_SCREEN_ERROR, FILE_DIALOG_SCREEN_ERRORPAGE, FILE_DIALOG_SCREEN_WAIT, FILE_EXPLORER_FILELIST, FILE_REPORT_OUTPUT, HTML_END, HTML_START, INPUT_DEFAULT, INPUT_NONE, JSP_WORKPLACE_URI, PARAM_DIRECTPUBLISH, PARAM_MODELFILE, PARAM_NEWRESOURCETYPE, PARAM_PUBLISHSIBLINGS, PARAM_RELATEDRESOURCES, PARAM_RESOURCELIST, PARAM_SUBRESOURCES, PARAM_WP_EXPLORER_RESOURCE, PARAM_WP_PROJECT, PARAM_WP_SITE, PARAM_WP_START, PARAM_WP_VIEW, PATH_DIALOGS, PATH_WORKPLACE, REQUEST_ATTRIBUTE_MULTIPART, REQUEST_ATTRIBUTE_RELOADTREE, RES_PATH_FILETYPES, RFS_PATH_RESOURCES, SESSION_WORKPLACE_CLASS, VFS_DIR_DEFAULTBODIES, VFS_DIR_TEMPLATES, VFS_PATH_COMMONS, VFS_PATH_EDITORS, VFS_PATH_GALLERIES, VFS_PATH_LOCALES, VFS_PATH_MODELDIALOG, VFS_PATH_MODULES, VFS_PATH_NEWRESOURCEDIALOG, VFS_PATH_RESOURCES, VFS_PATH_SITES, VFS_PATH_SYSTEM, VFS_PATH_VIEWS, VFS_PATH_WORKPLACE, VIEW_ADMIN, VIEW_DIRECT_EDIT, VIEW_EXPLORER, VIEW_GALLERY, VIEW_LIST, VIEW_WORKPLACE
-
Constructor Summary
ConstructorDescriptionCmsDialog
(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) Public constructor with JSP variables.Public constructor with JSP action element. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Used to close the current JSP dialog.protected String
appendDelimiter
(String attribute) Appends a space char.buildAjaxResultContainer
(String title) Returns the html code to build the ajax report container.protected String
Returns ajax wait message.Override to display additional options in the lock dialog.Returns the html code to build the confirmation messages.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 String
Returns the full path of the current workplace folder.Builds the outer dialog window border.dialogBlock
(int segment, String headline, boolean error) Builds a block with 3D border and optional subheadline in the dialog content area.Builds the end HTML for a block with 3D border in the dialog content area.dialogBlockStart
(String headline) Builds the start HTML for a block with 3D border and optional subheadline in the dialog content area.dialogButtonRow
(int segment) Builds the button row under the dialog content area without the buttons.Builds the end of the button row under the dialog content area without the buttons.Builds the start of the button row under the dialog content area without the buttons.dialogButtons
(int[] buttons, String[] attributes) Builds the html for the button row under the dialog content area, including buttons.Builds a button row with a single "close" button.dialogButtonsClose
(String closeAttribute) Builds a button row with a single "close" button.dialogButtonsCloseDetails
(String closeAttribute, String detailsAttribute) Builds a button row with a "close" and a "details" button.protected void
dialogButtonsHtml
(StringBuffer result, int button, String attribute) Renders the HTML for a single input button of a specified type.Builds a button row with a single "ok" button.dialogButtonsOk
(String okAttribute) Builds a button row with a single "ok" button.Builds a button row with an "ok" and a "cancel" button.dialogButtonsOkCancel
(String okAttributes, String cancelAttributes) Builds a button row with an "ok" and a "cancel" button.dialogButtonsOkCancelAdvanced
(String okAttributes, String cancelAttributes, String advancedAttributes) Builds a button row with an "ok", a "cancel" and an "advanced" button.dialogButtonsSetOkCancel
(String setAttributes, String okAttributes, String cancelAttributes) Builds a button row with a "set", an "ok", and a "cancel" button.dialogContent
(int segment, String title) Builds the content area of the dialog window.Returns the end html for the content area of the dialog window.dialogContentStart
(String title) Returns the start html for the content area of the dialog window.Returns the end html for the outer dialog window border.dialogHead
(String title) Builds the title of the dialog window.dialogHorizontalSpacer
(int width) Builds an invisible horizontal spacer with the specified width.Builds the necessary button row.dialogRow
(int segment) Builds a dialog line without break (display: block).Builds the end of a dialog line without break (display: block).Builds the start of a dialog line without break (display: block).Builds the standard javascript for submitting the dialog.Builds a horizontal separator line in the dialog content area.Builds a space between two elements in the dialog content area.Returns the start html for the outer dialog window border.dialogStart
(String attributes) Returns the start html for the outer dialog window border.dialogSubheadline
(String headline) Builds a subheadline in the dialog content area.dialogToggleStart
(String headline, String id, boolean show) Builds the HTML code to fold and unfold a white-box.dialogWhiteBox
(int segment) Builds a white box in the dialog content area.Builds the end of a white box in the dialog content area.Builds the start of a white box in the dialog content area.int
Returns the action value.protected String
Returns the link URL to get back one folder in the administration view.Returns the action to be carried out after a click on the cancel button..Returns the http URI of the current dialog, to be used as value for the "action" attribute of a html form.Returns the http URI of the current dialog, to be used as value for the "action" attribute of a html form.Returns the custom mapping for the online help.Returns the value of the action parameter, or null if this parameter was not provided.Returns the value of the close link parameter, or null if this parameter was not provided.Returns the value of the dialog type parameter, or null if this parameter was not provided.Returns the value of the frame name parameter.Returns the is popup parameter.Returns the value of the message parameter, or null if this parameter was not provided.Returns the value of the original parameters parameter.Returns the value of the preaction done parameter.Returns the value of the redirect flag parameter.Returns the value of the file parameter, or null if this parameter was not provided.Returns the value of the title parameter, or null if this parameter was not provided.getState()
Gets a formatted file state string.boolean
Checks if the current resource has lock state exclusive or inherited.boolean
Checks if this resource has siblings.Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.htmlStartStyle
(String title, 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
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
Returns if the dialog is called in direct edit mode before the editor is opened.protected void
Opens the launch pad view.protected void
openWorkplaceLink
(String workplaceLink) Opens a workplace UI link in the top frame.Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.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
Set the custom mapping for the online help.void
setParamAction
(String value) Sets the value of the action parameter.void
setParamCloseLink
(String value) Sets the value of the close link parameter.void
setParamDialogtype
(String value) Sets the value of the dialog type parameter.void
setParamFramename
(String value) Sets the value of the frame name parameter.void
setParamIsPopup
(String value) Sets the is popup parameter.void
setParamMessage
(String value) Sets the value of the message parameter.void
setParamOriginalParams
(String paramOriginalParams) Sets the value of the original parameters parameter.void
setParamPreActionDone
(String paramPreActionDone) Sets the value of the preaction done parameter.void
setParamRedirect
(String redirect) Sets the value of the redirect flag parameter.void
setParamResource
(String value) Sets the value of the file parameter.void
setParamTitle
(String value) Sets the value of the title parameter.Methods inherited from class org.opencms.workplace.tools.CmsToolDialog
computeUpLevelLink, 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 org.opencms.workplace.CmsWorkplace
addMessages, addMessages, allParamsAsHidden, allParamsAsRequest, allParamValues, bodyEnd, bodyStart, bodyStart, buildSelect, buildSelect, button, button, buttonBar, buttonBar, buttonBarHorizontalLine, buttonBarLabel, buttonBarLabel, buttonBarLine, buttonBarLineSpacer, buttonBarSeparator, buttonBarSpacer, buttonBarStartTab, canEditPermissionsForRoles, checkLock, checkLock, checkRole, decodeParamValue, fillParamValues, fillParamValues, generateCssStyle, generatePageEndExtended, generatePageEndSimple, generatePageStartExtended, generatePageStartSimple, getBroadcastMessageString, getCms, getEncoding, getExplorerFileListFullUri, getFrameSource, getJsp, getLocale, getMacroResolver, getMessages, getMultiPartFileItems, getParameterMap, getResourceUri, getResourceUri, getSession, getSettings, getSkinUri, getStartSiteRoot, getStartSiteRoot, getStaticResourceUri, getStaticResourceUri, getStyleUri, getStyleUri, getStyleUri, getTemporaryFileName, getWorkplaceExplorerLink, getWorkplaceExplorerLink, getWorkplaceSettings, htmlEnd, initMessages, initSettings, initTimeWarp, initUserSettings, initWorkplaceMembers, initWorkplaceMembers, initWorkplaceSettings, isForwarded, isHelpEnabled, isSubElement, isTemporaryFile, key, key, keyDefault, nullToEmpty, paramsAsHidden, paramsAsHidden, paramsAsParameterMap, paramsAsRequest, paramValues, resolveMacros, sendCmsRedirect, sendForward, setForwarded, shortKey, substituteSiteTitle, substituteSiteTitleStatic, switchToCurrentProject, switchToTempProject, updateUserPreferences
-
Field Details
-
ACTION_CANCEL
Value for the action: cancel.- See Also:
-
ACTION_CLOSEPOPUP
Value for the action: close popup window.- See Also:
-
ACTION_CLOSEPOPUP_SAVE
Value for the action: save & close popup window.- See Also:
-
ACTION_CONFIRMED
Value for the action: confirmed.- See Also:
-
ACTION_CONTINUE
Value for the action: continue.- See Also:
-
ACTION_DEFAULT
Value for the action: default (show initial dialog form).- See Also:
-
ACTION_LOCKS_CONFIRMED
Value for the action: locks confirmed.- See Also:
-
ACTION_OK
Value for the action: ok.- See Also:
-
ACTION_REPORT_BEGIN
Value for the action: begin the report.- See Also:
-
ACTION_REPORT_END
Value for the action: end the report.- See Also:
-
ACTION_REPORT_UPDATE
Value for the action: update the report.- See Also:
-
ACTION_SET
Value for the action: button "set" clicked.- See Also:
-
ACTION_WAIT
Value for the action: wait (show please wait screen).- See Also:
-
BUTTON_ADVANCED
Constant for the "Advanced" button in the build button methods.- See Also:
-
BUTTON_BACK
Constant for the "Back" button in the build button methods.- See Also:
-
BUTTON_CANCEL
Constant for the "Cancel" button in the build button methods.- See Also:
-
BUTTON_CLOSE
Constant for the "Close" button in the build button methods.- See Also:
-
BUTTON_CONTINUE
Constant for the "Continue" button in the build button methods.- See Also:
-
BUTTON_DETAILS
Constant for the "Details" button in the build button methods.- See Also:
-
BUTTON_DISCARD
Constant for the "Discard" button in the build button methods (same function as "Cancel" button but different text on button.- See Also:
-
BUTTON_EDIT
Constant for the "Edit" button in the build button methods (same function as "Ok" button but different text on button.- See Also:
-
BUTTON_OK
Constant for the "OK" button in the build button methods.- See Also:
-
BUTTON_OK_NO_SUBMIT
Constant for the "OK" button in the build button methods (without form submission).- See Also:
-
BUTTON_SET
Constant for the "Set" button in the build button methods.- See Also:
-
DIALOG_BACK
Request parameter value for the action: back.- See Also:
-
DIALOG_CANCEL
Request parameter value for the action: cancel.- See Also:
-
DIALOG_CONFIRMED
Request parameter value for the action: dialog confirmed.- See Also:
-
DIALOG_CONTINUE
Request parameter value for the action: continue.- See Also:
-
DIALOG_INITIAL
Request parameter value for the action: initial call.- See Also:
-
DIALOG_LOCKS_CONFIRMED
Request parameter value for the action: dialog locks confirmed.- See Also:
-
DIALOG_OK
Request parameter value for the action: ok.- See Also:
-
DIALOG_SET
Request parameter value for the action: set.- See Also:
-
DIALOG_WAIT
Request parameter value for the action: show please wait screen.- See Also:
-
PARAM_ACTION
Request parameter name for the action.- See Also:
-
PARAM_ACTION_VALUE_FOR_CHANGED_INDEX
Request parameter name for the action.- See Also:
-
PARAM_CLOSELINK
Request parameter name for the closelink.- See Also:
-
PARAM_DIALOGTYPE
Request parameter name for the dialog type.- See Also:
-
PARAM_ERRORSTACK
Request parameter name for the error stack.- See Also:
-
PARAM_FILE
Request parameter name for the file.- See Also:
-
PARAM_FRAMENAME
Request parameter name for the frame name.- See Also:
-
PARAM_ISPOPUP
Request parameter name for the "is popup" flag.- See Also:
-
PARAM_LOCK
Request parameter name for the lock.- See Also:
-
PARAM_MESSAGE
Request parameter name for the error message.- See Also:
-
PARAM_ORIGINALPARAMS
Request parameter name for the originalparams.- See Also:
-
PARAM_PREACTIONDONE
Request parameter name for the preactiondone.- See Also:
-
PARAM_REDIRECT
Request parameter name for the redirect flag.- See Also:
-
PARAM_RESOURCE
Request parameter name for the resource.- See Also:
-
PARAM_TARGET
Request parameter name for the target.- See Also:
-
PARAM_THREAD
Request parameter name for the thread id.- See Also:
-
PARAM_THREAD_HASNEXT
Request parameter name for indicating if another thread is following the current one.- See Also:
-
PARAM_TITLE
Request parameter name for the dialog title.- See Also:
-
REPORT_BEGIN
Request parameter value for the action: begin the report.- See Also:
-
REPORT_END
Request parameter value for the action: end the report.- See Also:
-
REPORT_UPDATE
Request parameter value for the action: update the report.- See Also:
-
ATTRIBUTE_THROWABLE
Key name for the throwable attribute.- See Also:
-
-
Constructor Details
-
CmsDialog
Public constructor with JSP action element.- Parameters:
jsp
- an initialized JSP action element
-
CmsDialog
public CmsDialog(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) Public constructor with JSP variables.- Parameters:
context
- the JSP page contextreq
- the JSP requestres
- the JSP response
-
-
Method Details
-
initCmsDialog
public 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.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.
- Parameters:
context
- the JSP page contextreq
- the JSP requestres
- the JSP response- Returns:
- an initialized CmsDialog instance that is read from the request attributes
-
actionCloseDialog
Used to close the current JSP dialog.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.
- Throws:
javax.servlet.jsp.JspException
- if including an element fails
-
buildAjaxResultContainer
Returns the html code to build the ajax report container.- Parameters:
title
- the title of the report box- Returns:
- html code
-
buildLockAdditionalOptions
Override to display additional options in the lock dialog.- Returns:
- html code to display additional options
-
buildLockConfirmationMessageJS
Returns the html code to build the confirmation messages.- Returns:
- html code
-
buildLockHeaderBox
Returns the html code to build the header box.- Returns:
- html code
- Throws:
CmsException
- if something goes wrong
-
dialog
Builds the outer dialog window border.- Parameters:
segment
- the HTML segment (START / END)attributes
- optional additional attributes for the opening dialog table- Returns:
- a dialog window start / end segment
-
dialogBlock
Builds a block with 3D border and optional subheadline in the dialog content area.- Parameters:
segment
- the HTML segment (START / END)headline
- the headline String for the blockerror
- if true, an error block will be created- Returns:
- 3D block start / end segment
-
dialogBlockEnd
Builds the end HTML for a block with 3D border in the dialog content area.- Returns:
- 3D block start / end segment
-
dialogBlockStart
Builds the start HTML for a block with 3D border and optional subheadline in the dialog content area.- Parameters:
headline
- the headline String for the block- Returns:
- 3D block start / end segment
-
dialogButtonRow
Builds the button row under the dialog content area without the buttons.- Parameters:
segment
- the HTML segment (START / END)- Returns:
- the button row start / end segment
-
dialogButtonRowEnd
Builds the end of the button row under the dialog content area without the buttons.- Returns:
- the button row end segment
-
dialogButtonRowStart
Builds the start of the button row under the dialog content area without the buttons.- Returns:
- the button row start segment
-
dialogButtons
Builds the html for the button row under the dialog content area, including buttons.- Parameters:
buttons
- array of constants of which buttons to include in the rowattributes
- array of Strings for additional button attributes- Returns:
- the html for the button row under the dialog content area, including buttons
-
dialogButtonsClose
Builds a button row with a single "close" button.- Returns:
- the button row
-
dialogButtonsClose
Builds a button row with a single "close" button.- Parameters:
closeAttribute
- additional attributes for the "close" button- Returns:
- the button row
-
dialogButtonsCloseDetails
Builds a button row with a "close" and a "details" button.- Parameters:
closeAttribute
- additional attributes for the "close" buttondetailsAttribute
- additional attributes for the "details" button- Returns:
- the button row
-
dialogButtonsOk
Builds a button row with a single "ok" button.- Returns:
- the button row
-
dialogButtonsOk
Builds a button row with a single "ok" button.- Parameters:
okAttribute
- additional attributes for the "ok" button- Returns:
- the button row
-
dialogButtonsOkCancel
Builds a button row with an "ok" and a "cancel" button.- Returns:
- the button row
-
dialogButtonsOkCancel
Builds a button row with an "ok" and a "cancel" button.- Parameters:
okAttributes
- additional attributes for the "ok" buttoncancelAttributes
- additional attributes for the "cancel" button- Returns:
- the button row
-
dialogButtonsOkCancelAdvanced
public String dialogButtonsOkCancelAdvanced(String okAttributes, String cancelAttributes, String advancedAttributes) Builds a button row with an "ok", a "cancel" and an "advanced" button.- Parameters:
okAttributes
- additional attributes for the "ok" buttoncancelAttributes
- additional attributes for the "cancel" buttonadvancedAttributes
- additional attributes for the "advanced" button- Returns:
- the button row
-
dialogButtonsSetOkCancel
public String dialogButtonsSetOkCancel(String setAttributes, String okAttributes, String cancelAttributes) Builds a button row with a "set", an "ok", and a "cancel" button.- Parameters:
setAttributes
- additional attributes for the "set" buttonokAttributes
- additional attributes for the "ok" buttoncancelAttributes
- additional attributes for the "cancel" button- Returns:
- the button row
-
dialogContent
Builds the content area of the dialog window.- Parameters:
segment
- the HTML segment (START / END)title
- the title String for the dialog window- Returns:
- a content area start / end segment
-
dialogContentEnd
Returns the end html for the content area of the dialog window.- Returns:
- the end html for the content area of the dialog window
-
dialogContentStart
Returns the start html for the content area of the dialog window.- Parameters:
title
- the title for the dialog- Returns:
- the start html for the content area of the dialog window
-
dialogEnd
Returns the end html for the outer dialog window border.- Returns:
- the end html for the outer dialog window border
-
dialogHead
Builds the title of the dialog window.- Parameters:
title
- the title String for the dialog window- Returns:
- the HTML title String for the dialog window
-
dialogHorizontalSpacer
Builds an invisible horizontal spacer with the specified width.- Parameters:
width
- the width of the spacer in pixels- Returns:
- an invisible horizontal spacer with the specified width
-
dialogLockButtons
Builds the necessary button row.- Returns:
- the button row
-
dialogRow
Builds a dialog line without break (display: block).- Parameters:
segment
- the HTML segment (START / END)- Returns:
- a row start / end segment
-
dialogRowEnd
Builds the end of a dialog line without break (display: block).- Returns:
- the row end segment
-
dialogRowStart
Builds the start of a dialog line without break (display: block).- Returns:
- the row start segment
-
dialogScriptSubmit
Builds the standard javascript for submitting the dialog.- Overrides:
dialogScriptSubmit
in classCmsToolDialog
- Returns:
- the standard javascript for submitting the dialog
-
dialogSeparator
Builds a horizontal separator line in the dialog content area.- Returns:
- a separator element
-
dialogSpacer
Builds a space between two elements in the dialog content area.- Returns:
- a space element
-
dialogStart
Returns the start html for the outer dialog window border.- Returns:
- the start html for the outer dialog window border
-
dialogStart
Returns the start html for the outer dialog window border.- Parameters:
attributes
- optional html attributes to insert- Returns:
- the start html for the outer dialog window border
-
dialogSubheadline
Builds a subheadline in the dialog content area.- Parameters:
headline
- the desired headline string- Returns:
- a subheadline element
-
dialogToggleStart
Builds the HTML code to fold and unfold a white-box.- Parameters:
headline
- the heading to displayid
- the id of the toggleshow
- true if the white box is open at the beginning- Returns:
- HTML code to fold and unfold a white-box
-
dialogWhiteBox
Builds a white box in the dialog content area.- Parameters:
segment
- the HTML segment (START / END)- Returns:
- the white box start / end segment
-
dialogWhiteBoxEnd
Builds the end of a white box in the dialog content area.- Returns:
- the white box end segment
-
dialogWhiteBoxStart
Builds the start of a white box in the dialog content area.- Returns:
- the white box start segment
-
getAction
Returns the action value.The action value is used on JSP pages to select the proper action in a large "switch" statement.
- Returns:
- the action value
-
getCancelAction
Returns the action to be carried out after a click on the cancel button..- Returns:
- the action to be carried out after a click on the cancel button.
-
getDialogRealUri
Returns the http URI of the current dialog, to be used as value for the "action" attribute of a html form.This URI is the real one.
- Returns:
- the http URI of the current dialog
-
getDialogUri
Returns the http URI of the current dialog, to be used as value for the "action" attribute of a html form.This URI could not be really the real one...
- Returns:
- the http URI of the current dialog
-
getOnlineHelpUriCustom
Returns the custom mapping for the online help.- Returns:
- the custom mapping for the online help
-
getParamAction
Returns the value of the action parameter, or null if this parameter was not provided.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.- Returns:
- the value of the action parameter
-
getParamCloseLink
Returns the value of the close link parameter, or null if this parameter was not provided.- Returns:
- the value of the close link parameter
-
getParamDialogtype
Returns the value of the dialog type parameter, or null if this parameter was not provided.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.
- Returns:
- the value of the dialog type parameter
-
getParamFramename
Returns the value of the frame name parameter.- Returns:
- the value of the frame name parameter
-
getParamIsPopup
Returns the is popup parameter.Use this parameter to indicate that the dialog is shown in a popup window.
- Returns:
- the is popup parameter
-
getParamMessage
Returns the value of the message parameter, or null if this parameter was not provided.The message parameter is used on dialogs to show any text message.
- Returns:
- the value of the message parameter
-
getParamOriginalParams
Returns the value of the original parameters parameter.This stores the request parameter values from a previous dialog, if necessary.
- Returns:
- the value of the original parameters parameter
-
getParamPreActionDone
Returns the value of the preaction done parameter.- Returns:
- the value of the preaction done parameter
-
getParamRedirect
Returns the value of the redirect flag parameter.- Returns:
- the value of the redirect flag parameter
-
getParamResource
Returns the value of the file parameter, or null if this parameter was not provided.The file parameter selects the file on which the dialog action is to be performed.
- Returns:
- the value of the file parameter
-
getParamTitle
Returns the value of the title parameter, or null if this parameter was not provided.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.
- Returns:
- the value of the title parameter
-
getState
Gets a formatted file state string.- Returns:
- formatted state string
- Throws:
CmsException
- if something goes wrong
-
hasCorrectLockstate
Checks if the current resource has lock state exclusive or inherited.This is used to determine whether the dialog shows the option to delete all siblings of the resource or not.
- Returns:
- true if lock state is exclusive or inherited, otherwise false
-
hasSiblings
Checks if this resource has siblings.- Returns:
- true if this resource has siblings
-
htmlStart
Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.- Returns:
- the start html of the page
-
htmlStart
Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.This overloads the default method of the parent class.
- Overrides:
htmlStart
in classCmsWorkplace
- Parameters:
helpUrl
- the key for the online help to include on the page- Returns:
- the start html of the page
-
htmlStart
Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.- Parameters:
helpUrl
- the key for the online help to include on the pagetitle
- the title for the page- Returns:
- the start html of the page
-
htmlStartStyle
Builds the start html of the page, including setting of DOCTYPE, inserting a header with the content-type and choosing an individual style sheet.- Parameters:
title
- the title for the pagestylesheet
- the style sheet to include- Returns:
- the start html of the page
-
includeErrorpage
Displays the throwable on the error page and logs the error.- Parameters:
wp
- the workplace classt
- the throwable to be displayed on the error page- Throws:
javax.servlet.jsp.JspException
- if the include of the error page jsp fails
-
isPopup
Returns the "isPopup" flag.- Returns:
- the "isPopup" flag
-
isPreEditor
Returns if the dialog is called in direct edit mode before the editor is opened.- Returns:
- true if the dialog is called in direct edit mode before the editor is opened
-
pageHtml
Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.This overloads the default method of the parent class.
- Overrides:
pageHtml
in classCmsWorkplace
- Parameters:
segment
- the HTML segment (START / END)helpUrl
- the url for the online help to include on the page- Returns:
- the start html of the page
-
pageHtml
Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.This overloads the default method of the parent class.
- Parameters:
segment
- the HTML segment (START / END)helpUrl
- the url for the online help to include on the pagetitle
- the title for the page- Returns:
- the start html of the page
-
setOnlineHelpUriCustom
Set the custom mapping for the online help.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)
- Parameters:
uri
- the left hand value in mapping.properties for the online help pages
-
setParamAction
Sets the value of the action parameter.- Parameters:
value
- the value to set
-
setParamCloseLink
Sets the value of the close link parameter.- Parameters:
value
- the value to set
-
setParamDialogtype
Sets the value of the dialog type parameter.- Parameters:
value
- the value to set
-
setParamFramename
Sets the value of the frame name parameter.- Parameters:
value
- the value to set
-
setParamIsPopup
Sets the is popup parameter.- Parameters:
value
- the is popup parameter value
-
setParamMessage
Sets the value of the message parameter.- Parameters:
value
- the value to set
-
setParamOriginalParams
Sets the value of the original parameters parameter.- Parameters:
paramOriginalParams
- the value of the original parameters parameter
-
setParamPreActionDone
Sets the value of the preaction done parameter.- Parameters:
paramPreActionDone
- the value of the preaction done parameter
-
setParamRedirect
Sets the value of the redirect flag parameter.- Parameters:
redirect
- the value of the redirect flag parameter
-
setParamResource
Sets the value of the file parameter.- Parameters:
value
- the value to set
-
setParamTitle
Sets the value of the title parameter.- Parameters:
value
- the value to set
-
appendDelimiter
Appends a space char. between tag attributes.- Parameters:
attribute
- a tag attribute- Returns:
- the tag attribute with a leading space char
-
buildAjaxWaitMessage
Returns ajax wait message.- Returns:
- html code
-
checkResourcePermissions
Checks if the permissions of the current user on the resource to use in the dialog are sufficient.Automatically generates a CmsMessageContainer object with an error message and stores it in the users session.
- Parameters:
required
- the required permissions for the dialogneededForFolder
- if true, the permissions are required for the parent folder of the resource (e.g. for editors)- Returns:
- true if the permissions are sufficient, otherwise false
-
checkResourcePermissions
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.Automatically generates a CmsMessageContainer object with an error message and stores it in the users session.
- Parameters:
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- Returns:
- true if the permissions are sufficient, otherwise false
-
computeCurrentFolder
Returns the full path of the current workplace folder.- Returns:
- the full path of the current workplace folder
-
dialogButtonsHtml
Renders the HTML for a single input button of a specified type.- Parameters:
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 null
-
getAdministrationBackLink
Returns the link URL to get back one folder in the administration view.- Returns:
- the link URL to get back one folder in the administration view
-
initWorkplaceRequestValues
protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request) Description copied from class:CmsWorkplace
Analyzes the request for workplace parameters and adjusts the workplace settings accordingly.- Overrides:
initWorkplaceRequestValues
in classCmsToolDialog
- Parameters:
settings
- the workplace settingsrequest
- the current request- See Also:
-
openLaunchpad
Opens the launch pad view.- Throws:
javax.servlet.jsp.JspException
- in case writing to the JSP output stream fails
-
openWorkplaceLink
Opens a workplace UI link in the top frame.- Parameters:
workplaceLink
- the workplace link to open- Throws:
IOException
- in case writing to the JSP output stream fails
-
setAction
Sets the action value.- Parameters:
value
- the action value
-