/** * Builds the HTML String for the element language selector.<p> * * This method has to use the resource request parameter because the temporary file is * not available in the upper button frame.<p> * * @param attributes optional attributes for the <select> tag * @return the HTML for the element language select box */ public String buildSelectElementLanguage(String attributes) { return buildSelectElementLanguage(attributes, getParamResource(), getElementLocale()); }
/** * Returns the different xml editor widgets used in the form to display.<p> * * @return the different xml editor widgets used in the form to display */ public CmsXmlContentWidgetVisitor getWidgetCollector() { if (m_widgetCollector == null) { // create an instance of the widget collector m_widgetCollector = new CmsXmlContentWidgetVisitor(getElementLocale()); m_content.visitAllValuesWith(m_widgetCollector); } return m_widgetCollector; }
/** * Builds the html String for the element language selector.<p> * * This method has to use the resource request parameter because the temporary file is * not available in the upper button frame.<p> * * @param attributes optional attributes for the <select> tag * @return the html for the element language select box */ public String buildSelectElementLanguage(String attributes) { return buildSelectElementLanguage(attributes, getParamResource(), getElementLocale()); }
/** * Returns the different xml editor widgets used in the form to display.<p> * * @return the different xml editor widgets used in the form to display */ public CmsXmlContentWidgetVisitor getWidgetCollector() { if (m_widgetCollector == null) { // create an instance of the widget collector m_widgetCollector = new CmsXmlContentWidgetVisitor(getElementLocale()); m_content.visitAllValuesWith(m_widgetCollector); } return m_widgetCollector; }
/** * Performs the save content action.<p> * * @see org.opencms.workplace.editors.CmsEditor#actionSave() */ @Override public void actionSave() throws JspException { actionSave(getElementLocale()); if (getAction() != ACTION_CANCEL) { // save successful, set save action setAction(ACTION_SAVE); } }
/** * Performs the save content action.<p> * * @see org.opencms.workplace.editors.CmsEditor#actionSave() */ @Override public void actionSave() throws JspException { actionSave(getElementLocale()); if (getAction() != ACTION_CANCEL) { // save successful, set save action setAction(ACTION_SAVE); } }
Locale loc = getElementLocale(); m_content.removeLocale(loc);
Locale loc = getElementLocale(); m_content.removeLocale(loc);
setEditorValues(getElementLocale()); } catch (CmsXmlException e) { m_content.removeValue(getParamElementName(), getElementLocale(), index); } else { if (m_content.hasValue(getParamElementName(), getElementLocale())) { m_content.addValue(getCms(), getParamElementName(), getElementLocale(), index); if (getValidationHandler().hasWarnings(getElementLocale())) {
setEditorValues(getElementLocale()); writeContent();
setEditorValues(getElementLocale()); } catch (CmsXmlException e) { I_CmsXmlContentValue value = m_content.getValue(getParamElementName(), getElementLocale(), index); if (getValidationHandler().hasWarnings(getElementLocale())) {
setEditorValues(getElementLocale()); } catch (CmsXmlException e) { I_CmsXmlContentValue value = m_content.getValue(getParamElementName(), getElementLocale(), index); if (getValidationHandler().hasWarnings(getElementLocale())) {
setEditorValues(getElementLocale()); writeContent(); CmsObject cloneCms = getCloneCms();
setEditorValues(getElementLocale()); } catch (CmsXmlException e) { I_CmsXmlContentValue value = m_content.getValue(getParamElementName(), getElementLocale(), index); m_content.removeValue(getParamElementName(), getElementLocale(), index); getElementLocale()).size() == 0)) { m_content.removeValue(xpath, getElementLocale(), CmsXmlUtils.getXpathIndexInt(xpath) - 1); if (m_content.hasValue(getParamElementName(), getElementLocale())) { } else { m_content.addValue(getCms(), elementPath, getElementLocale(), index); elementPath = CmsXmlUtils.createXpathElement(elementPath, index + 1); ? CmsXmlUtils.removeFirstXpathElement(pathToChoice) : null; I_CmsXmlContentValue newVal = m_content.addValue(getCms(), newPath, getElementLocale(), index); newPath = newVal.getPath(); m_content.addValue(getCms(), elementPath, getElementLocale(), index); if (getValidationHandler().hasWarnings(getElementLocale())) {
Locale newLocale = getElementLocale(); try { setEditorValues(oldLocale);
Locale newLocale = getElementLocale(); try { setEditorValues(oldLocale);
/** * 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); } }
if (m_content.hasChoiceOptions(choiceName, getElementLocale())) { choiceElements.put(info); List<I_CmsXmlSchemaType> options = m_content.getChoiceOptions(choiceName, getElementLocale()); for (Iterator<I_CmsXmlSchemaType> i = options.iterator(); i.hasNext();) {
/** * 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); } }
getCms(), m_paramNewLink, getElementLocale(), getParamResource(), getParamModelFile(),