I have a GWT application in which I want to show some static content in new tab.

private native void openResultWindow(String contents) /*-{
    var printWindow = window.open("", "PrintWin", "scrollbars=yes", false);
    if (printWindow && printWindow.top) {

    } else {
        alert("The print feature works by opening a popup window, but our popup window was blocked by your browser.  If you can disable the blocker temporarily, you'll be able to print here.  Sorry!");

Right now I am using the above code to show the static content as simple html page styled with CSS. The contents variable passed to the function contains the HTML string. But I need richer UI. Are there any other UI options which can be integrated with GWT?


1 Answers

Ahmad Bawaneh On

If you want to render something really complex and want to integrate other UIs then what you should open the window with a URL instead of passing the content directly, the URL should point to a server where the static/dynamic content should be served, this could be any html page with what ever css and styles desired. or could be a servlet, or event another GWT application.