public abstract class CmsWidgetDialog extends CmsDialog implements I_CmsWidgetDialog
限定符和类型 | 字段和说明 |
---|---|
static int |
ACTION_ELEMENT_ADD
Action for optional element creation.
|
static int |
ACTION_ELEMENT_REMOVE
Action for optional element removal.
|
static int |
ACTION_ERROR
Value for the action: error in the form validation.
|
static int |
ACTION_SAVE
Value for the action: save the dialog.
|
static java.lang.String |
DIALOG_SAVE
Request parameter value for the action: save the dialog.
|
static java.lang.String |
EDITOR_ACTION_ELEMENT_ADD
Indicates an optional element should be created.
|
static java.lang.String |
EDITOR_ACTION_ELEMENT_REMOVE
Indicates an optional element should be removed.
|
static java.lang.String |
HIDDEN_PARAM_PREFIX
Prefix for "hidden" parameters, required since these must be unescaped later.
|
protected java.util.List<java.lang.Throwable> |
m_commitErrors
The errors thrown by commit actions.
|
protected java.lang.Object |
m_dialogObject
The object edited with this widget dialog.
|
protected java.util.List<java.lang.String> |
m_pages
The allowed pages for this dialog in a List.
|
protected java.lang.String |
m_paramPage
Controls which page is currently displayed in the dialog.
|
protected java.util.List<java.lang.Throwable> |
m_validationErrorList
The validation errors for the input form.
|
protected java.util.Map<java.lang.String,java.util.List<CmsWidgetDialogParameter>> |
m_widgetParamValues
Contains all parameter value of this dialog.
|
protected java.util.List<CmsWidgetDialogParameter> |
m_widgets
The list of widgets used on the dialog.
|
ACTION_CANCEL, ACTION_CLOSEPOPUP, ACTION_CLOSEPOPUP_SAVE, ACTION_CONFIRMED, ACTION_CONTINUE, ACTION_DEFAULT, ACTION_LOCKS_CONFIRMED, ACTION_OK, ACTION_REPORT_BEGIN, ACTION_REPORT_END, ACTION_REPORT_UPDATE, ACTION_SET, ACTION_WAIT, ATTRIBUTE_THROWABLE, BUTTON_ADVANCED, BUTTON_BACK, BUTTON_CANCEL, BUTTON_CLOSE, BUTTON_CONTINUE, BUTTON_DETAILS, BUTTON_DISCARD, BUTTON_EDIT, BUTTON_OK, BUTTON_OK_NO_SUBMIT, BUTTON_SET, DIALOG_BACK, DIALOG_CANCEL, DIALOG_CONFIRMED, DIALOG_CONTINUE, DIALOG_INITIAL, DIALOG_LOCKS_CONFIRMED, DIALOG_OK, DIALOG_SET, DIALOG_WAIT, PARAM_ACTION, PARAM_CLOSELINK, PARAM_DIALOGTYPE, PARAM_ERRORSTACK, PARAM_FILE, PARAM_FRAMENAME, PARAM_ISPOPUP, PARAM_LOCK, PARAM_MESSAGE, PARAM_ORIGINALPARAMS, PARAM_PREACTIONDONE, PARAM_REDIRECT, PARAM_RESOURCE, PARAM_TARGET, PARAM_THREAD, PARAM_THREAD_HASNEXT, PARAM_TITLE, REPORT_BEGIN, REPORT_END, REPORT_UPDATE
PARAM_ADMIN_PROJECT, PARAM_BASE, PARAM_FORCE, PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW
DEBUG, 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, PARAM_WP_EXPLORER_RESOURCE, PARAM_WP_PROJECT, PARAM_WP_SITE, 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_MODULES, VFS_PATH_RESOURCES, VFS_PATH_SYSTEM, VFS_PATH_VIEWS, VFS_PATH_WORKPLACE, VIEW_DIRECT_EDIT, VIEW_WORKPLACE
构造器和说明 |
---|
CmsWidgetDialog(CmsJspActionElement jsp)
Public constructor with JSP action element.
|
CmsWidgetDialog(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Public constructor with JSP variables.
|
限定符和类型 | 方法和说明 |
---|---|
void |
actionCancel()
Deletes the edited dialog object from the session.
|
abstract void |
actionCommit()
Commits the edited object after pressing the "OK" button.
|
void |
actionToggleElement()
Adds or removes an optional element.
|
protected void |
addCommitError(java.lang.Exception error)
Adds the given error to the list of errors that are thrown by save actions or form generation.
|
protected void |
addWidget(CmsWidgetDialogParameter param)
Adds a new widget parameter definition to the list of all widgets of this dialog.
|
java.lang.String |
buildAddElement(java.lang.String elementName,
int insertAfter,
boolean enabled)
Returns the html for a button to add an optional element.
|
java.lang.String |
buildDialogForm()
Builds the HTML for the dialog form.
|
java.lang.String |
buildRemoveElement(java.lang.String elementName,
int index,
boolean enabled)
Returns the html for a button to remove an optional element.
|
void |
clearDialogObject()
Clears the "dialog object" for this widget dialog by removing it from the current users session.
|
protected boolean |
closeDialogOnCommit()
Returns
true if the dialog should be closed after the values have been committed. |
protected java.util.List<java.lang.Throwable> |
commitWidgetValues()
Commits all values on the dialog.
|
protected java.util.List<java.lang.Throwable> |
commitWidgetValues(java.lang.String dialogPage)
Commits all values on the given dialog page.
|
protected java.lang.String |
createDialogHtml()
Creates the dialog HTML for all defined widgets of this dialog.
|
protected java.lang.String |
createDialogHtml(java.lang.String dialog)
Creates the dialog HTML for all defined widgets of the named dialog (page).
|
protected java.lang.String |
createDialogRowHtml(CmsWidgetDialogParameter base)
Creates the dialog HTML for all occurrences of one widget parameter.
|
protected java.lang.String |
createDialogRowsHtml(int startIndex,
int endIndex)
Creates the dialog widget rows HTML for the specified widget indices.
|
protected java.lang.String |
createWidgetBlockEnd()
Creates the complete widget dialog end block HTML that finishes a widget block.
|
protected java.lang.String |
createWidgetBlockStart(java.lang.String headline)
Create the complete widget dialog start block HTML that begins a widget block with optional headline.
|
protected java.lang.String |
createWidgetErrorHeader()
Creates the HTML for the error message if validation errors were found.
|
protected java.lang.String |
createWidgetTableEnd()
Creates the HTML for the table around the dialog widgets.
|
protected java.lang.String |
createWidgetTableStart()
Creates the HTML to close the table around the dialog widgets.
|
protected java.lang.String |
defaultActionHtml()
Generates the dialog starting html code.
|
protected java.lang.String |
defaultActionHtmlContent()
Returns the html code for the default action content.
|
protected java.lang.String |
defaultActionHtmlEnd()
Generates the dialog ending html code.
|
protected java.lang.String |
defaultActionHtmlStart()
Generates the dialog starting html code.
|
protected abstract void |
defineWidgets()
Defines the list of parameters for this dialog.
|
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 |
dialogButtonsCustom()
Creates the HTML for the buttons on the dialog.
|
void |
displayDialog()
Performs the dialog actions depending on the initialized action and displays the dialog form.
|
void |
displayDialog(boolean writeLater)
Performs the dialog actions depending on the initialized action and displays the dialog form if needed.
|
protected void |
fillWidgetValues(javax.servlet.http.HttpServletRequest request)
Fills all widgets of this widget dialog with the values from the request parameters.
|
int |
getButtonStyle()
Returns the style setting to use when generating buttons for this widget dialog.
|
java.util.List<java.lang.Throwable> |
getCommitErrors()
Returns the errors that are thrown by save actions or form generation.
|
java.lang.Object |
getDialogObject()
Returns the dialog object for this widget dialog, or
null
if no dialog object has been set. |
protected java.lang.String |
getDialogTitle()
Returns the title for this Dialog.
|
java.util.Set<java.lang.String> |
getHelpMessageIds()
Returns a set of help messages ids that are already included on the widget dialog.
|
protected abstract java.lang.String[] |
getPageArray()
Returns the allowed pages for this dialog.
|
protected java.util.List<java.lang.String> |
getPages()
Returns the allowed pages for this dialog.
|
java.lang.String |
getParamElementIndex()
Returns the index of the element to add or remove.
|
java.lang.String |
getParamElementName()
Returns the name of the element to add or remove.
|
protected CmsWidgetDialogParameter |
getParameterDefinition(java.lang.String name)
Returns the parameter widget definition for the given parameter name.
|
protected java.util.Map<java.lang.String,java.util.List<CmsWidgetDialogParameter>> |
getParameters()
Returns the map with the widget parameter values.
|
java.lang.String |
getParamPage()
Returns the page parameter.
|
java.lang.String |
getParamValue(java.lang.String name)
Returns the value of the widget parameter with the given name, or
null
if no such widget parameter is available. |
java.lang.String |
getParamValue(java.lang.String name,
int index)
Returns the value of the widget parameter with the given name and index, or
null
if no such widget parameter is available. |
java.lang.String |
getUserAgent()
Returns the "user-agent" of the current request, or
null in case no
request is available. |
protected java.util.List<java.lang.Throwable> |
getValidationErrorList()
Returns the validation errors for the dialog.
|
protected java.lang.String |
getWidget(CmsWidgetDialogParameter param)
Returns the widget HTML code for the given parameter.
|
java.lang.String |
getWidgetHtmlEnd()
Generates the HTML for the end of the widget dialog.
|
java.lang.String |
getWidgetIncludes()
Generates the HTML include tags for external JavaScripts files of the used widgets.
|
java.lang.String |
getWidgetInitCalls()
Generates the JavaScript init calls for the used widgets.
|
java.lang.String |
getWidgetInitMethods()
Generates the JavaScript initialization methods for the used widgets.
|
protected java.util.List<CmsWidgetDialogParameter> |
getWidgets()
Returns the list of all widgets used on this widget dialog, the
List must contain Objects of type
. |
protected boolean |
hasCommitErrors()
Returns
true if the current dialog (page) has commit errors. |
protected boolean |
hasValidationErrors()
Returns
true if the current dialog (page) has validation errors. |
protected void |
initWorkplaceRequestValues(CmsWorkplaceSettings settings,
javax.servlet.http.HttpServletRequest request)
Analyzes the request for workplace parameters and adjusts the workplace
settings accordingly.
|
java.lang.String |
paramsAsHidden()
Returns all initialized parameters of the current workplace class
as hidden field tags that can be inserted in a form.
|
protected void |
setCommitErrors(java.util.List<java.lang.Throwable> errors)
Sets the errors that are thrown by save actions or form generation.
|
void |
setDialogObject(java.lang.Object dialogObject)
Stores the given object as "dialog object" for this widget dialog in the current users session.
|
protected void |
setKeyPrefix(java.lang.String prefix)
Sets an optional localized key prefix identificator for all widgets.
|
protected void |
setPages(java.util.List<java.lang.String> pages)
Sets the allowed pages for this dialog.
|
void |
setParamElementIndex(java.lang.String elementIndex)
Sets the index of the element to add or remove.
|
void |
setParamElementName(java.lang.String elementName)
Sets the name of the element to add or remove.
|
void |
setParamPage(java.lang.String paramPage)
Sets the page parameter.
|
protected void |
setValidationErrorList(java.util.List<java.lang.Throwable> errors)
Sets the validation errors for the dialog.
|
protected void |
validateParamaters()
Should be overridden for parameter validation.
|
java.lang.String |
widgetParamsAsHidden()
Returns the values of all widget parameters of this dialog as HTML hidden fields.
|
java.lang.String |
widgetParamsAsHidden(java.lang.String excludeDialogPage)
Returns the values of all widget parameters of this dialog as HTML hidden fields,
excluding the widget values that are on the given dialog page.
|
void |
writeDialog()
Writes the dialog html code, only if the
is set. |
actionCloseDialog, appendDelimiter, buildAjaxResultContainer, buildAjaxWaitMessage, buildLockAdditionalOptions, buildLockConfirmationMessageJS, buildLockDialog, buildLockDialog, buildLockHeaderBox, checkResourcePermissions, checkResourcePermissions, computeCurrentFolder, dialog, dialogBlock, dialogButtonRow, dialogButtonRowEnd, dialogButtonRowStart, dialogButtons, dialogButtonsClose, dialogButtonsClose, dialogButtonsCloseDetails, dialogButtonsHtml, dialogButtonsOk, dialogButtonsOk, dialogButtonsOkCancel, dialogButtonsOkCancel, dialogButtonsOkCancelAdvanced, dialogButtonsSetOkCancel, dialogContent, dialogContentEnd, dialogContentStart, dialogEnd, dialogHead, dialogHorizontalSpacer, dialogLockButtons, dialogRow, dialogRowEnd, dialogRowStart, dialogScriptSubmit, dialogSeparator, dialogSpacer, dialogStart, dialogStart, dialogSubheadline, dialogToggleStart, dialogWhiteBox, dialogWhiteBoxEnd, dialogWhiteBoxStart, getAction, getAdministrationBackLink, getCancelAction, getDialogRealUri, getDialogUri, getOnlineHelpUriCustom, getParamAction, getParamCloseLink, getParamDialogtype, getParamFramename, getParamIsPopup, getParamMessage, getParamOriginalParams, getParamPreActionDone, getParamRedirect, getParamResource, getParamTitle, getState, hasCorrectLockstate, hasSiblings, htmlStart, htmlStart, htmlStart, htmlStartStyle, includeErrorpage, initCmsDialog, isPopup, isPreEditor, pageHtml, pageHtml, setAction, setOnlineHelpUriCustom, setParamAction, setParamCloseLink, setParamDialogtype, setParamFramename, setParamIsPopup, setParamMessage, setParamOriginalParams, setParamPreActionDone, setParamRedirect, setParamResource, setParamTitle
computeUpLevelLink, dialogTitle, getAdminTool, getCurrentToolPath, getParamBase, getParamForce, getParamPath, getParamRoot, getParamStyle, getParentPath, getToolManager, iconsBlockArea, iconsBlockAreaEnd, iconsBlockAreaStart, initAdminTool, pageBody, pageHtmlStyle, setParamBase, setParamForce, setParamPath, setParamRoot, setParamStyle, useNewStyle
addMessages, addMessages, allParamsAsHidden, allParamsAsRequest, allParamValues, bodyEnd, bodyStart, bodyStart, buildSelect, buildSelect, button, button, buttonBar, buttonBar, buttonBarHorizontalLine, buttonBarLabel, buttonBarLabel, buttonBarLine, buttonBarLineSpacer, buttonBarSeparator, buttonBarSpacer, buttonBarStartTab, checkLock, checkLock, checkRole, decodeParamValue, fillParamValues, fillParamValues, getBroadcastMessageString, getCms, getEncoding, getExplorerFileListFullUri, getFrameSource, getJsp, getLocale, getMacroResolver, getMessages, getMultiPartFileItems, getParameterMap, getResourceUri, getResourceUri, getSession, getSettings, getSkinUri, getStartSiteRoot, getStyleUri, getStyleUri, getStyleUri, getTemporaryFileName, htmlEnd, initMessages, initSettings, initTimeWarp, initUserSettings, initWorkplaceMembers, initWorkplaceSettings, isForwarded, isHelpEnabled, isSubElement, isTemporaryFile, key, key, keyDefault, nullToEmpty, paramsAsHidden, paramsAsParameterMap, paramsAsRequest, paramValues, resolveMacros, sendCmsRedirect, sendForward, setForwarded, shortKey, substituteSiteTitle, switchToCurrentProject, switchToTempProject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
button, buttonBar, buttonBarHorizontalLine, buttonBarSeparator, buttonBarSpacer, buttonBarStartTab, dialogHorizontalSpacer, getLocale, getMessages, useNewStyle
public static final int ACTION_ELEMENT_ADD
public static final int ACTION_ELEMENT_REMOVE
public static final int ACTION_ERROR
public static final int ACTION_SAVE
public static final java.lang.String DIALOG_SAVE
public static final java.lang.String EDITOR_ACTION_ELEMENT_ADD
public static final java.lang.String EDITOR_ACTION_ELEMENT_REMOVE
public static final java.lang.String HIDDEN_PARAM_PREFIX
protected java.util.List<java.lang.Throwable> m_commitErrors
protected java.lang.Object m_dialogObject
protected java.util.List<java.lang.String> m_pages
protected java.lang.String m_paramPage
protected java.util.List<java.lang.Throwable> m_validationErrorList
protected java.util.Map<java.lang.String,java.util.List<CmsWidgetDialogParameter>> m_widgetParamValues
protected java.util.List<CmsWidgetDialogParameter> m_widgets
public CmsWidgetDialog(CmsJspActionElement jsp)
jsp
- an initialized JSP action elementpublic CmsWidgetDialog(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 responsepublic void actionCancel()
public abstract void actionCommit() throws java.io.IOException, javax.servlet.ServletException
java.io.IOException
- in case of errors forwarding to the required result pagejavax.servlet.ServletException
- in case of errors forwarding to the required result pagepublic void actionToggleElement()
Depends on the value stored in the
method.CmsDialog.getAction()
public java.lang.String buildAddElement(java.lang.String elementName, int insertAfter, boolean enabled)
elementName
- name of the elementinsertAfter
- the index of the element after which the new element should be createdenabled
- if true, the button to add an element is shown, otherwise a spacer is returnedpublic java.lang.String buildDialogForm()
public java.lang.String buildRemoveElement(java.lang.String elementName, int index, boolean enabled)
elementName
- name of the elementindex
- the element index of the element to removeenabled
- if true, the button to remove an element is shown, otherwise a spacer is returnedpublic void clearDialogObject()
public java.lang.String dialogBlockEnd()
dialogBlockEnd
在类中 CmsDialog
public java.lang.String dialogBlockStart(java.lang.String headline)
dialogBlockStart
在类中 CmsDialog
headline
- the headline String for the blockpublic java.lang.String dialogButtonsCustom()
public void displayDialog() throws javax.servlet.jsp.JspException, java.io.IOException, javax.servlet.ServletException
javax.servlet.jsp.JspException
- if dialog actions failjava.io.IOException
- if writing to the JSP out fails, or in case of errors forwarding to the required result pagejavax.servlet.ServletException
- in case of errors forwarding to the required result pagepublic void displayDialog(boolean writeLater) throws javax.servlet.jsp.JspException, java.io.IOException, javax.servlet.ServletException
writeLater
- if true
no output is written,
you have to call manually the defaultActionHtml()
method.javax.servlet.jsp.JspException
- if dialog actions failjava.io.IOException
- if writing to the JSP out fails, or in case of errors forwarding to the required result pagejavax.servlet.ServletException
- in case of errors forwarding to the required result pagepublic int getButtonStyle()
I_CmsWidgetDialog
getButtonStyle
在接口中 I_CmsWidgetDialog
I_CmsWidgetDialog.getButtonStyle()
public java.util.List<java.lang.Throwable> getCommitErrors()
public java.lang.Object getDialogObject()
null
if no dialog object has been set.null
public java.util.Set<java.lang.String> getHelpMessageIds()
I_CmsWidgetDialog
This is used to prevent the occurence of multiple html div
id's with the same
value when generating the help texts. For valid html, each id can be used only once.
getHelpMessageIds
在接口中 I_CmsWidgetDialog
I_CmsWidgetDialog.getHelpMessageIds()
public java.lang.String getParamElementIndex()
public java.lang.String getParamElementName()
public java.lang.String getParamPage()
public java.lang.String getParamValue(java.lang.String name)
null
if no such widget parameter is available.name
- the widget parameter name to get the value forpublic java.lang.String getParamValue(java.lang.String name, int index)
null
if no such widget parameter is available.name
- the widget parameter name to get the value forindex
- the widget parameter indexpublic java.lang.String getUserAgent()
I_CmsWidgetDialog
null
in case no
request is available.getUserAgent
在接口中 I_CmsWidgetDialog
I_CmsWidgetDialog.getUserAgent()
public java.lang.String getWidgetHtmlEnd()
This HTML includes additional components, for example the <div> tags containing the help texts.
public java.lang.String getWidgetIncludes() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- if an error occurs during JavaScript generationpublic java.lang.String getWidgetInitCalls() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- the JavaScript init calls for the used widgetspublic java.lang.String getWidgetInitMethods() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- if an error occurs during JavaScript generationpublic java.lang.String paramsAsHidden()
CmsWorkplace
paramsAsHidden
在类中 CmsWorkplace
CmsWorkplace.paramsAsHidden()
public void setDialogObject(java.lang.Object dialogObject)
dialogObject
- the object to storepublic void setParamElementIndex(java.lang.String elementIndex)
elementIndex
- the index of the element to add or removepublic void setParamElementName(java.lang.String elementName)
elementName
- the name of the element to add or removepublic void setParamPage(java.lang.String paramPage)
paramPage
- the page parameter to setpublic java.lang.String widgetParamsAsHidden()
CmsWorkplace.paramsAsHidden()
public java.lang.String widgetParamsAsHidden(java.lang.String excludeDialogPage)
This can be used to create multi-page dialogs where the values are passed from one page to another before everything is submitted. If a widget A is used on page X, there should be no "hidden" HTML field for A since otherwise A would have 2 values when submitting the dialog page: The one from the widget itself and the one from the hidden field. This may lead to undefined results when processing the submitted values.
excludeDialogPage
- the dialog page to exclude the values forCmsWorkplace.paramsAsHidden()
public void writeDialog() throws java.io.IOException, javax.servlet.jsp.JspException
CmsDialog.ACTION_DEFAULT
is set.javax.servlet.jsp.JspException
- if dialog actions failjava.io.IOException
- if writing to the JSP out fails, or in case of errors forwarding to the required result pageprotected void addCommitError(java.lang.Exception error)
If the error list has not been initialized yet, this is done automatically.
error
- the errors to addprotected void addWidget(CmsWidgetDialogParameter param)
param
- the widget parameter definition to addprotected boolean closeDialogOnCommit()
true
if the dialog should be closed after the values have been committed.
The default implementation returns true
in case there are no
commit errors.
true
if the dialog should be closed after the values have been committedprotected java.util.List<java.lang.Throwable> commitWidgetValues()
protected java.util.List<java.lang.Throwable> commitWidgetValues(java.lang.String dialogPage)
dialogPage
- the dialog (page) to commitprotected java.lang.String createDialogHtml()
protected java.lang.String createDialogHtml(java.lang.String dialog)
To get a more complex layout variation, you have to overwrite this method in your dialog class.
dialog
- the dialog (page) to get the HTML forprotected java.lang.String createDialogRowHtml(CmsWidgetDialogParameter base)
base
- the widget parameter baseprotected java.lang.String createDialogRowsHtml(int startIndex, int endIndex)
startIndex
- the widget index to start withendIndex
- the widget index to stop atprotected java.lang.String createWidgetBlockEnd()
protected java.lang.String createWidgetBlockStart(java.lang.String headline)
headline
- the headline String for the blockprotected java.lang.String createWidgetErrorHeader()
protected java.lang.String createWidgetTableEnd()
protected java.lang.String createWidgetTableStart()
protected java.lang.String defaultActionHtml() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- if something goes wrongprotected java.lang.String defaultActionHtmlContent()
protected java.lang.String defaultActionHtmlEnd()
protected java.lang.String defaultActionHtmlStart() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- if something goes wrongprotected abstract void defineWidgets()
protected void fillWidgetValues(javax.servlet.http.HttpServletRequest request)
request
- the current HTTP servlet requestprotected java.lang.String getDialogTitle()
In the default implementation this method returns null
.
Override this if needed.
null
if this dialog has no titleprotected abstract java.lang.String[] getPageArray()
protected java.util.List<java.lang.String> getPages()
protected CmsWidgetDialogParameter getParameterDefinition(java.lang.String name)
name
- the parameter name to get the definition forprotected java.util.Map<java.lang.String,java.util.List<CmsWidgetDialogParameter>> getParameters()
protected java.util.List<java.lang.Throwable> getValidationErrorList()
The method (@link CmsWidgetDialog#commitWidgetValues(String)) has to set this list.
protected java.lang.String getWidget(CmsWidgetDialogParameter param)
param
- the name (id) of the parameter to get the widget HTML forprotected java.util.List<CmsWidgetDialogParameter> getWidgets()
CmsWidgetDialogParameter
.protected boolean hasCommitErrors()
true
if the current dialog (page) has commit errors.true
if the current dialog (page) has commit errorsprotected boolean hasValidationErrors()
true
if the current dialog (page) has validation errors.true
if the current dialog (page) has validation errorsprotected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request)
CmsWorkplace
initWorkplaceRequestValues
在类中 CmsDialog
settings
- the workplace settingsrequest
- the current requestCmsWorkplace.initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest)
protected void setCommitErrors(java.util.List<java.lang.Throwable> errors)
errors
- the errors that are thrown by save actions or form generationprotected void setKeyPrefix(java.lang.String prefix)
prefix
- the optional localized key prefix identificator for all widgetsI_CmsWidgetParameter.setKeyPrefix(java.lang.String)
protected void setPages(java.util.List<java.lang.String> pages)
pages
- the allowed pages for this dialogprotected void setValidationErrorList(java.util.List<java.lang.Throwable> errors)
Use this in the method (@link CmsWidgetDialog#commitWidgetValues(String)) to set the list.
errors
- the validation errorsprotected void validateParamaters() throws java.lang.Exception
The exception is never seen by the user, so it can be just a new
.Exception
()
java.lang.Exception
- if the parameters are not valid