/** * Shows the selected error page in case of an exception.<p> * * @param editor initialized instance of the editor class * @param exception the current exception * @throws JspException if inclusion of the error page fails */ protected void showErrorPage(Object editor, Exception exception) throws JspException { // save initialized instance of the editor class in request attribute for included sub-elements getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, editor); // reading of file contents failed, show error dialog setAction(ACTION_SHOW_ERRORMESSAGE); setParamTitle(key(Messages.GUI_TITLE_EDIT_1, new Object[] {CmsResource.getName(getParamResource())})); if (exception != null) { getJsp().getRequest().setAttribute(ATTRIBUTE_THROWABLE, exception); if (CmsLog.getLog(editor).isWarnEnabled()) { CmsLog.getLog(editor).warn(exception.getLocalizedMessage(), exception); } } // include the common error dialog getJsp().include(FILE_DIALOG_SCREEN_ERRORPAGE); } }
/** * Shows the selected error page in case of an exception.<p> * * @param editor initialized instance of the editor class * @param exception the current exception * @throws JspException if inclusion of the error page fails */ protected void showErrorPage(Object editor, Exception exception) throws JspException { // save initialized instance of the editor class in request attribute for included sub-elements getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, editor); // reading of file contents failed, show error dialog setAction(ACTION_SHOW_ERRORMESSAGE); setParamTitle(key(Messages.GUI_TITLE_EDIT_1, new Object[] {CmsResource.getName(getParamResource())})); if (exception != null) { getJsp().getRequest().setAttribute(ATTRIBUTE_THROWABLE, exception); if (CmsLog.getLog(editor).isWarnEnabled()) { CmsLog.getLog(editor).warn(exception.getLocalizedMessage(), exception); } } // include the common error dialog getJsp().include(FILE_DIALOG_SCREEN_ERRORPAGE); } }
setParamCloseLink(getJsp().link(getParamBacklink())); } else { setParamCloseLink(getJsp().link(getParamResource())); getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); getJsp().include(FILE_DIALOG_CLOSE); } else { if (CmsStringUtil.isNotEmpty(getParamBacklink())) { setParamCloseLink(getJsp().link(getParamBacklink())); getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); getJsp().include(FILE_DIALOG_CLOSE); } else {
setParamCloseLink(getJsp().link(getParamBacklink())); } else { setParamCloseLink(getJsp().link(getParamResource())); getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); getJsp().include(FILE_DIALOG_CLOSE); } else { if (CmsStringUtil.isNotEmpty(getParamBacklink())) { setParamCloseLink(getJsp().link(getParamBacklink())); getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); getJsp().include(FILE_DIALOG_CLOSE); } else {
/** * Returns the editor action for a "cancel" button.<p> * * This overwrites the cancel method of the CmsDialog class.<p> * * Always use this value, do not write anything directly in the html page.<p> * * @return the default action for a "cancel" button */ public String buttonActionCancel() { String target = null; if (Boolean.valueOf(getParamDirectedit()).booleanValue()) { // editor is in direct edit mode if (CmsStringUtil.isNotEmpty(getParamBacklink())) { // set link to the specified back link target target = getParamBacklink(); } else { // set link to the edited resource target = getParamResource(); } } else { // in workplace mode, show explorer view target = OpenCms.getLinkManager().substituteLink(getCms(), CmsWorkplace.JSP_WORKPLACE_URI); } return "onclick=\"top.location.href='" + getJsp().link(target) + "';\""; }
/** * Returns the editor action for a "cancel" button.<p> * * This overwrites the cancel method of the CmsDialog class.<p> * * Always use this value, do not write anything directly in the html page.<p> * * @return the default action for a "cancel" button */ public String buttonActionCancel() { String target = null; if (Boolean.valueOf(getParamDirectedit()).booleanValue()) { // editor is in direct edit mode if (CmsStringUtil.isNotEmpty(getParamBacklink())) { // set link to the specified back link target target = getParamBacklink(); } else { // set link to the edited resource target = getParamResource(); } } else { // in workplace mode, show explorer view target = OpenCms.getLinkManager().substituteLink(getCms(), CmsFrameset.JSP_WORKPLACE_URI); } return "onclick=\"top.location.href='" + getJsp().link(target) + "';\""; }