Can you try it with a recent snapshot?
http://people.apache.org/maven-snapshot-repository/org/apache/tapestry/tapestry-framework/4.1.5-SNAPSHOT/

I think someone mentioned that something like this now should work.

A workaround is to have the script you want to execute already in the
template and conditionally render it

On Feb 5, 2008 1:20 PM, Richard Hoberman <[EMAIL PROTECTED]> wrote:
> Hi
>
> I'm using Tapestry 4.1.3.
>
> I'm trying unsuccessfully to invoke some javascript after an
> asyncrhonous update.  I'll post code if needed, but here is the summary:
>
> 1. Simple page with a list.
> 2. Initialization javascript makes list sortable using
> script.aculo.us:   Sortable.create('cityList', {only:'sortable',
> onUpdate: onCityListReordered });
> 3. I have an EventListener that fires when the list is reordered
> 4. The list is asynchronously updated.
>
> So far so good.
>
> The problem is that after the update, the list items are no longer
> draggable.  I'm assuming that this is because the replacement list needs
> to be re-initialized via Sortable.create.  If this is right then I need
> to invoke some javascript after the update.
>
> I try adding the javascript from the event listener method:
>
> @EventListener( targets = { "cityList" }, events = { "onUpdate" } )
> public void onItemsReordered(IRequestCycle cycle) {
>
>       //updates
>
>      cycle.getResponseBuilder().addInitializationScript(this, "...inline
> javascript...");
>
> }
>
> This causes a NullPointerException because the DojoAjaxResponseBuilder
> has a null PageRenderSupportImpl (_prs).
>
> Am I approaching this the right way?  Any pointers appreciated.
>
> Richard Hoberman
>
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to