protected void openEditDialog(boolean isNew, String mode) {

        // create a form to submit a post request to the editor JSP
        Map<String, String> formValues = new HashMap<String, String>();
        if (m_editableData.getSitePath() != null) {
            formValues.put("resource", m_editableData.getSitePath());
        }
        if (m_editableData.getElementLanguage() != null) {
            formValues.put("elementlanguage", m_editableData.getElementLanguage());
        }
        if (m_editableData.getElementName() != null) {
            formValues.put("elementname", m_editableData.getElementName());
        }
        String backlink = CmsCoreProvider.get().getUri();
        if (Window.Location.getPath().endsWith(backlink)) {
            // CmsCoreProvider.get().getUri() is the request context uri from the time the direct edit provider
            // includes are generated. In case the template has changed the request context uri before that point,
            // we don't append the request parameters, as they may be inappropriate for the new URI.
            backlink += Window.Location.getQueryString();
        }
        formValues.put("backlink", backlink);
        formValues.put("redirect", "true");
        formValues.put("directedit", "true");
        formValues.put("nofoot", "1");
        formValues.put("editcontext", CmsCoreProvider.get().getUri());
        String postCreateHandler = m_editableData.getPostCreateHandler();
        if (postCreateHandler != null) {
            formValues.put(CmsEditorConstants.PARAM_POST_CREATE_HANDLER, postCreateHandler);
        }
        if (mode != null) {
            formValues.put(CmsEditorConstants.PARAM_MODE, mode);
        }

        if (isNew) {
            formValues.put("newlink", m_editableData.getNewLink());
            formValues.put("editortitle", m_editableData.getNewTitle());
        }
        FormElement formElement = CmsDomUtil.generateHiddenForm(
            CmsCoreProvider.get().link(CmsCoreProvider.get().getContentEditorUrl()),
            Method.post,
            Target.TOP,
            formValues);
        getMarkerTag().appendChild(formElement);
        formElement.submit();
    }
protected void openEditDialog ( boolean isNew , String mode ) { Map < String , String > formValues = new HashMap < String , String > ( ) ; if ( m_editableData . getSitePath ( ) != null ) { formValues . put ( "resource" , m_editableData . getSitePath ( ) ) ; } if ( m_editableData . getElementLanguage ( ) != null ) { formValues . put ( "elementlanguage" , m_editableData . getElementLanguage ( ) ) ; } if ( m_editableData . getElementName ( ) != null ) { formValues . put ( "elementname" , m_editableData . getElementName ( ) ) ; } String backlink = CmsCoreProvider . get ( ) . getUri ( ) ; if ( Window . Location . getPath ( ) . endsWith ( backlink ) ) { backlink += Window . Location . getQueryString ( ) ; } formValues . put ( "backlink" , backlink ) ; formValues . put ( "redirect" , "true" ) ; formValues . put ( "directedit" , "true" ) ; formValues . put ( "nofoot" , "1" ) ; formValues . put ( "editcontext" , CmsCoreProvider . get ( ) . getUri ( ) ) ; String postCreateHandler = m_editableData . getPostCreateHandler ( ) ; if ( postCreateHandler != null ) { formValues . put ( CmsEditorConstants . PARAM_POST_CREATE_HANDLER , postCreateHandler ) ; } if ( mode != null ) { formValues . put ( CmsEditorConstants . PARAM_MODE , mode ) ; } if ( isNew ) { formValues . put ( "newlink" , m_editableData . getNewLink ( ) ) ; formValues . put ( "editortitle" , m_editableData . getNewTitle ( ) ) ; } FormElement formElement = CmsDomUtil . generateHiddenForm ( CmsCoreProvider . get ( ) . link ( CmsCoreProvider . get ( ) . getContentEditorUrl ( ) ) , Method . post , Target . TOP , formValues ) ; getMarkerTag ( ) . appendChild ( formElement ) ; formElement . submit ( ) ; }
Opens the content editor.<p>

@param isNew <code>true</code> to create and edit a new resource
@param mode the content creation mode