4.4.2.7. openViewer

The openViewer method has to open a new browser window that displays the content of the node. This method is called by Docmenta if the user chooses to view the content in a separate window. Normally, this is done by clicking the menu item "View" in the context menu. In our example, the method is implemented by invoking the JavaScript statement window.open(...). The page that is loaded in the opened window is the same as for the preview, namely the page returned by the getPreviewURL method:
    public void openViewer(WebUserSession webSess, String nodeId)
    throws Exception
    {
        String url = getPreviewURL(webSess, nodeId);
        String js = "window.open('" + url +
          "', '_blank', 'width=420,height=480,location=no,menubar=no')";
        webSess.evalJavaScript(js);
    }