/** * Returns the current element locale.<p> * * @return the current element locale */ public Locale getElementLocale() { if (m_elementLocale == null) { m_elementLocale = CmsLocaleManager.getLocale(getParamElementlanguage()); } return m_elementLocale; }
/** * Returns the current element locale.<p> * * @return the current element locale */ public Locale getElementLocale() { if (m_elementLocale == null) { m_elementLocale = CmsLocaleManager.getLocale(getParamElementlanguage()); } return m_elementLocale; }
/** * Performs the change body action of the editor.<p> */ public void actionChangeBodyElement() { try { // save eventually changed content of the editor to the temporary file Locale oldLocale = CmsLocaleManager.getLocale(getParamOldelementlanguage()); performSaveContent(getParamOldelementname(), oldLocale); } catch (CmsException e) { // show error page try { showErrorPage(this, e); } catch (JspException exc) { // should usually never happen if (LOG.isInfoEnabled()) { LOG.info(exc); } } } // re-initialize the element name if the language has changed if (!getParamElementlanguage().equals(getParamOldelementlanguage())) { initBodyElementName(getParamOldelementname()); } // get the new editor content initContent(); }
/** * Performs the change body action of the editor.<p> */ public void actionChangeBodyElement() { try { // save eventually changed content of the editor to the temporary file Locale oldLocale = CmsLocaleManager.getLocale(getParamOldelementlanguage()); performSaveContent(getParamOldelementname(), oldLocale); } catch (CmsException e) { // show error page try { showErrorPage(this, e); } catch (JspException exc) { // should usually never happen if (LOG.isInfoEnabled()) { LOG.info(exc); } } } // re-initialize the element name if the language has changed if (!getParamElementlanguage().equals(getParamOldelementlanguage())) { initBodyElementName(getParamOldelementname()); } // get the new editor content initContent(); }
/** * Performs the preview page action in a new browser window.<p> * * @throws IOException if redirect fails * @throws JspException if inclusion of error page fails */ public void actionPreview() throws IOException, JspException { try { // save content of the editor to the temporary file performSaveContent(getParamElementname(), getElementLocale()); } catch (CmsException e) { // show error page showErrorPage(this, e); } // redirect to the temporary file with current active element language String param = "?" + org.opencms.i18n.CmsLocaleManager.PARAMETER_LOCALE + "=" + getParamElementlanguage(); sendCmsRedirect(getParamTempfile() + param); }
/** * Performs the preview page action in a new browser window.<p> * * @throws IOException if redirect fails * @throws JspException if inclusion of error page fails */ public void actionPreview() throws IOException, JspException { try { // save content of the editor to the temporary file performSaveContent(getParamElementname(), getElementLocale()); } catch (CmsException e) { // show error page showErrorPage(this, e); } // redirect to the temporary file with current active element language String param = "?" + org.opencms.i18n.CmsLocaleManager.PARAMETER_LOCALE + "=" + getParamElementlanguage(); sendCmsRedirect(getParamTempfile() + param); }
if (CmsStringUtil.isNotEmpty(getParamElementname()) && getParamElementname().equals(getParamOldelementname())) { if (CmsStringUtil.isNotEmpty(getParamElementlanguage()) && getParamElementlanguage().equals(getParamOldelementlanguage())) { return;
if (CmsStringUtil.isNotEmpty(getParamElementname()) && getParamElementname().equals(getParamOldelementname())) { if (CmsStringUtil.isNotEmpty(getParamElementlanguage()) && getParamElementlanguage().equals(getParamOldelementlanguage())) { return;