The openEditor method is called by Docmenta, when the user chooses to edit a content-node. Normally, a user edits a node by clicking the menu item "Edit" in the context menu. The implementation of the openEditor method has to open a new browser window that allows to edit the content-node identified by the nodeId argument.
In our example the implementation is similar to the implementation of the openViewer method, except that the JSP page edit.jsp is opened instead of view.jsp:
    public void openEditor(WebUserSession webSess, String nodeId)
    throws Exception
        StoreConnection conn = webSess.getOpenedStore();
        String url = relativeURL + "/edit.jsp" +
            "?docsess=" + encode(webSess.getSessionId()) +
            "&nodeid=" + encode(nodeId) +
            "&store=" + encode(conn.getStoreId()) +
            "&version=" + encode(conn.getVersionId().toString()) +
            "&lang=" + encode(conn.getCurrentLanguage().getCode());
        url = webSess.encodeURL(url);
        String js = "window.open('" + url +
          "', '_blank', 'width=420,height=480,location=no,menubar=no')";
Compared to the view.jsp page, the edit.jsp page requires additional URL parameters, namely store, version and lang. These parameters identify the store and content language, which is important when the content is saved.