Hi Sam,

seems to me you've taken the code from a posting I've done some time ago ;-)
I'm still using the same code and it works with the IE. The problem with the session timeout
must have an other cause.

There exists an alternative approach for PDF download in the Tobago demo. Maybe you
can try this.

Regards
Helmut


 

Hi:

        I am using the IE browser.  I create a print button to open a new browser to print, then I tried to submit a record form the original browser, but nothing got submitted.  When I click on other tab, I got session timeout.  It seems the FaceContext was lost.  I would need to refresh the browser in order to get back the FaceContext object back. Could anyone tell me how to open a new browser and the FaceContext will not lost from the original browser?  Or is this a bug for Tobago?  Thanks.

I am using this suggestion below:

JSP

  ...

  <tc:script >

    // Everytime the page is loaded, check for an existing PDF file to display

    function showPrintResult(url) {

      if (url != null && url != "") {

        window.open(url, "Print");

      }

    }

  </tc:script>

  ...

  <tc:button label="Print" id="printButton"

    action=""/>

  ...

PrintController

 

  public void printAction() {

    // Generate PDF file

    ...

    // Set PDF file

    printFile = "http://localhost:8080/gena/print/test.pdf";;

  }

  public String getPrintFile() {

    // Return and reset PDF file

    String tmp = printFile;

    printFile = null;

    return tmp;

  }

--> Sam Wong

Reply via email to