Your body is already being rendered by a component, ie I'm assuming
you have a <span jwcid="@Body" > somewhere in your project.

Define a new component, called MyBody or whatever you like, give it a
jwc file that points to the component class you would like to handle
the component, and then be sure to define a .html file to go along
with it that specifies <span jwcid="@RenderBody"> so that your
components body is written...Preferrably you will extend Body to do
this I think?

Otherwise, since Body is already a component there is absolutely no
reason why you couldn't just write the attribute directly on the <span
jwcid="@Body" onload="javascript:window.open();" > tag right? Not sure
what you are trying to do...

On 11/22/05, Rudolf Baloun <[EMAIL PROTECTED]> 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