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]

Reply via email to