The following refers to Tapestry 3.0.3:
you want to use a Body and a Script component in your page.
The script defines in the referred .script file a <initialization> block, where you can put your javascript code. This will be automagically included in a function
that gets called by the Body component from the onload.
Have a look at documentation for the Body and Script components to get the details.

Bye

Ivano.

Rudolf Baloun wrote:

Hi,

i use Tapestry 4 Beta 13.
I open with a buttonclick a new window.
In some cases i want to add a body-attribute (onload="javascript:window.print();").
How can i realize it?

Code:

public formSubmit(IRequestCycle cycle){
   .......
final HttpServletResponse response = iRequestCycle.getRequestContext().getResponse();
   .....
   // HERE I NEED SOMETHING LIKE:
   // resonse.addBodyAttribute("onload=\"javascript:window.print();\"");
}

Any help would be nice.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to