/** * Generates the javascript initialization calls for the used widgets in the editor form.<p> * * @return the javascript initialization calls for the used widgets * @throws JspException if including the error page fails */ public String getXmlEditorInitCalls() throws JspException { StringBuffer result = new StringBuffer(512); try { // iterate over unique widgets from collector Iterator i = getWidgetCollector().getUniqueWidgets().iterator(); while (i.hasNext()) { I_CmsWidget widget = (I_CmsWidget)i.next(); result.append(widget.getDialogInitCall(getCms(), this)); } } catch (Exception e) { showErrorPage(e); } return result.toString(); }
/** * Generates the JavaScript initialization calls for the used widgets in the editor form.<p> * * @return the JavaScript initialization calls for the used widgets * @throws JspException if including the error page fails */ public String getXmlEditorInitCalls() throws JspException { StringBuffer result = new StringBuffer(512); try { // iterate over unique widgets from collector Iterator<I_CmsWidget> i = getWidgetCollector().getUniqueWidgets().iterator(); while (i.hasNext()) { I_CmsWidget widget = i.next(); result.append(widget.getDialogInitCall(getCms(), this)); } } catch (Exception e) { showErrorPage(e); } return result.toString(); }
showErrorPage(e); return "";
showErrorPage(e); return "";
showErrorPage(e); } catch (CmsException e) {
showErrorPage(e); } catch (CmsException e) {
/** * Performs the save content action.<p> * * This is also used when changing the element language.<p> * * @param locale the locale to save the content * @throws JspException if including the error page fails */ public void actionSave(Locale locale) throws JspException { try { setEditorValues(locale); // check if content has errors if (!hasValidationErrors()) { // no errors found, write content and copy temp file contents writeContent(); commitTempFile(); // set the modified parameter setParamModified(Boolean.TRUE.toString()); } } catch (CmsException e) { showErrorPage(e); } }
} catch (CmsException e) { showErrorPage(this, e);
/** * Performs the save content action.<p> * * This is also used when changing the element language.<p> * * @param locale the locale to save the content * @throws JspException if including the error page fails */ public void actionSave(Locale locale) throws JspException { try { setEditorValues(locale); // check if content has errors if (!hasValidationErrors()) { // no errors found, write content and copy temp file contents writeContent(); commitTempFile(); // set the modified parameter setParamModified(Boolean.TRUE.toString()); // update the offline search indices OpenCms.getSearchManager().updateOfflineIndexes(); } } catch (CmsException e) { showErrorPage(e); } }
} catch (CmsXmlException e) { showErrorPage(e); return; } catch (CmsException e) { showErrorPage(e);
} catch (CmsXmlException e) { showErrorPage(e); return; } catch (CmsException e) { showErrorPage(e);
/** * Performs the copy locale action.<p> * * @throws JspException if something goes wrong */ public void actionCopyElementLocale() throws JspException { try { setEditorValues(getElementLocale()); if (!hasValidationErrors()) { // !m_content.validate(getCms()).hasErrors(getElementLocale())) { // save content of the editor only to the temporary file writeContent(); // remove eventual release & expiration date from temporary file to make preview work getCms().setDateReleased(getParamTempfile(), CmsResource.DATE_RELEASED_DEFAULT, false); getCms().setDateExpired(getParamTempfile(), CmsResource.DATE_EXPIRED_DEFAULT, false); } } catch (CmsException e) { // show error page showErrorPage(this, e); } }
} catch (CmsXmlException e) { showErrorPage(e); return; } catch (CmsException e) { showErrorPage(e);
/** * Performs the copy locale action.<p> * * @throws JspException if something goes wrong */ public void actionCopyElementLocale() throws JspException { try { setEditorValues(getElementLocale()); if (!hasValidationErrors()) { // save content of the editor only to the temporary file writeContent(); CmsObject cloneCms = getCloneCms(); CmsUUID tempProjectId = OpenCms.getWorkplaceManager().getTempFileProjectId(); cloneCms.getRequestContext().setCurrentProject(getCms().readProject(tempProjectId)); // remove eventual release & expiration date from temporary file to make preview work cloneCms.setDateReleased(getParamTempfile(), CmsResource.DATE_RELEASED_DEFAULT, false); cloneCms.setDateExpired(getParamTempfile(), CmsResource.DATE_EXPIRED_DEFAULT, false); } } catch (CmsException e) { // show error page showErrorPage(this, e); } }
} catch (CmsXmlException e) { showErrorPage(e); return; } catch (CmsException e) { showErrorPage(e);