Hi Stefan, Rather than making your javascript depend on understanding Tapestry’s workings, perhaps you can simply command things from the server-side? When the server-side responds to the request with a zone, eg. ajaxResponseRenderer.addZone(zoneElld); could it also respond with a callback commanding the listeners to refresh themselves? Eg. ajaxResponseRenderer.addCallback(makeCallbackToRefreshListeners()).
If you need an example of this kind of callback, look in Modal.java in http://jumpstart.doublenegative.com.au/jumpstart7/examples/javascript/modal/1 <http://jumpstart.doublenegative.com.au/jumpstart7/examples/javascript/modal/1> HTH, Geoff > On 22 Jul 2015, at 7:44 pm, Stefan <ste...@wammel.com> wrote: > > > Hi guys, > > on some complex components i need zone-updates and make use of > t5/core/zone.deferredZoneUpdate(‚zoneElId', URI) > > My problem is that events.zone.update (and willUpdate & didUpdate) are fired > twice. > I need to listen on that event to re-install listeners to components in the > refreshed zone. > > I tried to track this down: > > 1. t5.core.zone.deferredZoneUpdate will trigger ‚events.zone.refresh‘ > > 2. a listener on ‚events.zone.refresh‘ will call t5.core.ajax() > and passes a function to trigger zone.update on success > > 3. t5.core.ajax() itself will call on success: > pageinit.handlePartialPageRenderResponse(response, successHandler); > pageinit.handlePartialPageRenderResponse then triggers ‚events.zone.update‘ > the first time. > After that it will call the passed onSuccess-handler which results in a > double triggered zone.update event. > > > Did i made a mistake here? > For me i fixed that with replacing t5.core.zone.deferredZoneUpdate() with > t5.core.ajax(). > > (i’m using T5.4 b32) > > > > Regards, > Stefan > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org >