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 onload="showPrintResult('#{printController.printFile}')">
// 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.printAction}"/>
...
PrintController
public void printAction() {
// Generate PDF file
...
// Set PDF file
printFile = "http://localhost:8080/gena/print/test.pdf"
<http://localhost:8080/gena/print/test.pdf%22> ;;
}
public String getPrintFile() {
// Return and reset PDF file
String tmp = printFile;
printFile = null;
return tmp;
}
--> Sam Wong