Re: T4-AJAX executing client side script from an async listener
yes it's 4.1.5, how would i do that andreas? I find the documentation on this stuff very limited. p Andreas Andreou wrote: Can't you conditionally include a @Script in the response? Also, that's on 4.1.5, right? On Fri, Mar 28, 2008 at 1:32 AM, Paul Stanton <[EMAIL PROTECTED]> wrote: Hi all, I have a form which is handled via an async listener, which currently just does some component updates: ResponseBuilder builder = getRequestCycle().getResponseBuilder(); builder.updateComponent("dataPanes"); builder.updateComponent("filterSubmit"); But now I need to be able to execute some script on the client once the updates have completed. I'm assuming this can be achieved, but I can't figure out how. I've tried using the writeBodyScript method, but the builder's writer is null: builder.beginBodyScript(writer, getRequestCycle()); builder.writeBodyScript(writer, "alert('here');", getRequestCycle()); builder.endBodyScript(writer, getRequestCycle()); If I change the listener to use JSON the writer is not null, but it still doesn't work, and my update component calls don't work. Any tips appreciated. Thanks, Paul. - 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]
Re: T4-AJAX executing client side script from an async listener
Can't you conditionally include a @Script in the response? Also, that's on 4.1.5, right? On Fri, Mar 28, 2008 at 1:32 AM, Paul Stanton <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a form which is handled via an async listener, which currently > just does some component updates: > > ResponseBuilder builder = getRequestCycle().getResponseBuilder(); > builder.updateComponent("dataPanes"); > builder.updateComponent("filterSubmit"); > > But now I need to be able to execute some script on the client once the > updates have completed. I'm assuming this can be achieved, but I can't > figure out how. > > I've tried using the writeBodyScript method, but the builder's writer is > null: > > builder.beginBodyScript(writer, getRequestCycle()); > builder.writeBodyScript(writer, "alert('here');", getRequestCycle()); > builder.endBodyScript(writer, getRequestCycle()); > > If I change the listener to use JSON the writer is not null, but it > still doesn't work, and my update component calls don't work. > > Any tips appreciated. > > Thanks, Paul. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T4-AJAX executing client side script from an async listener
Hi all, I have a form which is handled via an async listener, which currently just does some component updates: ResponseBuilder builder = getRequestCycle().getResponseBuilder(); builder.updateComponent("dataPanes"); builder.updateComponent("filterSubmit"); But now I need to be able to execute some script on the client once the updates have completed. I'm assuming this can be achieved, but I can't figure out how. I've tried using the writeBodyScript method, but the builder's writer is null: builder.beginBodyScript(writer, getRequestCycle()); builder.writeBodyScript(writer, "alert('here');", getRequestCycle()); builder.endBodyScript(writer, getRequestCycle()); If I change the listener to use JSON the writer is not null, but it still doesn't work, and my update component calls don't work. Any tips appreciated. Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]