protected void performSaveContent(String body, Locale locale) throws CmsException {

        // prepare the content for saving
        String content = prepareContent(true);

        String contentConversion = m_page.getConversion();
        // check if cleanup was selected in the editor, we have to add the cleanup parameter
        if (EDITOR_CLEANUP.equals(getParamAction())) {
            if ((contentConversion == null) || (contentConversion.equals(CmsHtmlConverter.PARAM_DISABLED))) {
                // if the current conversion mode is "false" only, we have to remove the "false" value and set it to "cleanup", as "false" will be stronger than all other values
                contentConversion = CmsHtmlConverter.PARAM_WORD;
            } else {
                // add "cleanup" to the already existing values
                contentConversion += ";" + CmsHtmlConverter.PARAM_WORD;
            }
        }
        m_page.setConversion(contentConversion);

        // create the element if necessary and if content is present
        if (!m_page.hasValue(body, locale) && !"".equals(content)) {
            m_page.addValue(body, locale);
        }

        // get the enabled state of the element
        boolean enabled = m_page.isEnabled(body, locale);

        // set the element data
        if (m_page.hasValue(body, locale)) {
            m_page.setStringValue(getCms(), body, locale, content);
        }

        // write the file
        m_file.setContents(m_page.marshal());
        m_file = getCms().writeFile(m_file);

        // content might have been modified during write operation
        m_page = CmsXmlPageFactory.unmarshal(getCms(), m_file);
        if (m_page.hasValue(body, locale)) {
            getCms().getRequestContext().setAttribute(CmsRequestContext.ATTRIBUTE_EDITOR, Boolean.TRUE);
            content = m_page.getStringValue(getCms(), body, locale);
            if (content == null) {
                content = "";
            }
            setParamContent(content);
            prepareContent(false);
            m_page.setEnabled(body, locale, enabled);
        }
    }
protected void performSaveContent ( String body , Locale locale ) throws CmsException { String content = prepareContent ( true ) ; String contentConversion = m_page . getConversion ( ) ; if ( EDITOR_CLEANUP . equals ( getParamAction ( ) ) ) { if ( ( contentConversion == null ) || ( contentConversion . equals ( CmsHtmlConverter . PARAM_DISABLED ) ) ) { contentConversion = CmsHtmlConverter . PARAM_WORD ; } else { contentConversion += ";" + CmsHtmlConverter . PARAM_WORD ; } } m_page . setConversion ( contentConversion ) ; if ( ! m_page . hasValue ( body , locale ) && ! "" . equals ( content ) ) { m_page . addValue ( body , locale ) ; } boolean enabled = m_page . isEnabled ( body , locale ) ; if ( m_page . hasValue ( body , locale ) ) { m_page . setStringValue ( getCms ( ) , body , locale , content ) ; } m_file . setContents ( m_page . marshal ( ) ) ; m_file = getCms ( ) . writeFile ( m_file ) ; m_page = CmsXmlPageFactory . unmarshal ( getCms ( ) , m_file ) ; if ( m_page . hasValue ( body , locale ) ) { getCms ( ) . getRequestContext ( ) . setAttribute ( CmsRequestContext . ATTRIBUTE_EDITOR , Boolean . TRUE ) ; content = m_page . getStringValue ( getCms ( ) , body , locale ) ; if ( content == null ) { content = "" ; } setParamContent ( content ) ; prepareContent ( false ) ; m_page . setEnabled ( body , locale , enabled ) ; } }
Saves the editor content to the temporary file.<p>

@param body the body name to write
@param locale the body locale to write
@throws CmsException if writing the file fails