How to print in a new page?
Hi,
There is a button on a page,the button's function as follows:
1)do some database operation
2)generate printing String and put into a sessionbean's property
3)open a new page
How to do?
Thanks
Smile.
Hi,
There is a button on a page,the button's function as follows:
1)do some database operation
2)generate printing String and put into a sessionbean's property
3)open a new page
How to do?
Thanks
Smile.
Hi,
I has search in this forum,the thread is the same problem as follows,but I don't understand.
http://forum.java.sun.com/thread.jspa?forumID=881&threadID=5130404
Thanks
Smile.
Hi,all
I has a unperfect solution for this problem,as follows:
1)add a textfield(id="textField1") on page,and set height = 1px,width = 1px
2)put a button(id="Button1") over textField1,overlay textField1,but don't set textField1's visible property to false
3)add javascript document.getElementById("form1:textField1").focus();
to Button1's onclick property
4)add javascript window.open("/yx/faces/newPage1.jsp", "_blank","height="+screen.availHeight+",width=,"+screen.availWidth - 195 +"toolbar=no,menubar=no,status=yes,scrollbars=yes");
to textField1's onfocus property
Ok,when clicking Button1,can transfer SessionBean's property to the new page.
Anybody have good idea?
Thanks.
Smile.
Hi,all
This solution can resolve only one printing page.
Click print button can generate a StringBuilder array for printing,and binding a sessionbean property.
How to open several pages for printing by length of StringBuilder array?Transfer suffix of StringBuilder array,in page prerender() get the StringBuilder[suffix]'s value and print.
It's the reason for pagination printing that max length of datatype-varchar in SQL SERVER is 8000.
Thanks.
Smile.