Unfortunately this doesn't work because Environmental stuff is not available when doing partial page renders - well for 5.0.18 at least, maybe it works with 5.1.0.1? This is the perfect mechanism for doing this though. I'll be trying 5.1 later this week so I'll try it again then.
Thanks. > -----Original Message----- > From: Fernando Padilla [mailto:f...@alum.mit.edu] > Sent: 24 March 2009 15:35 > To: Tapestry users > Subject: Re: Executing javascript on ajax call return > > This already works.. when you do RenderSupport.addScript(), while > rendering a zone/block, it will be executed when that zone is put into > the page. But I can't remember what version of tapestry this got > turned > on.. > > Blower, Andy wrote: > > I would like to be able to add javascript to the 'script' key section > that is returned as a partial page render. Client side events are okay, > but being able to return some JS that runs is more flexible. It's also > partially there already and just needs exposing I think. > > > > At present we've resorted to returning some inline JS in the markup > returned. Nasty, but it works. I assume we've not missed a better way > of doing this? > > > >> -----Original Message----- > >> From: Howard Lewis Ship [mailto:hls...@gmail.com] > >> Sent: 24 March 2009 00:54 > >> To: Tapestry users > >> Subject: Re: Executing javascript on ajax call return > >> > >> I've been thinking for a while that there needs to be more client- > side > >> events, so that the zone element could ire "tapestry:zone:fetched", > >> "tapestry:zone:show", etc. > >> > >> On Mon, Mar 23, 2009 at 3:19 PM, Thiago H. de Paula Figueiredo > >> <thiag...@gmail.com> wrote: > >>> Is therea JIRA for that so I can vote on it? > >>> > >>> Em Mon, 23 Mar 2009 17:29:03 -0300, Fernando Padilla > >> <f...@alum.mit.edu> > >>> escreveu: > >>> > >>>> Nope, there is no way to do javascript callbacks after a zone is > >> updated. > >>>> Zones right now are missing lifecycle callbacks, that you can > hook > >> into. > >>>> They do have the show/update callbacks that the Effects hook > into, > >> but it > >>>> could/should/hopefully will be expanded, eventually.. :) > >>>> > >>>> things like: > >>>> > >>>> preFetch > >>>> preShow > >>>> preUpdate > >>>> postUpdate > >>>> > >>>> > >>>> > >>>> But if you wanted to hack up your own, then start looking at > >> tapestry.js: > >>>> Tapestry.ZoneManager > >>>> Tapestry.Initializer.zone > >>>> Tapestry.Initializer.linkZone > >>>> > >>>> > >>>> > >>>> Thiago H. de Paula Figueiredo wrote: > >>>>> Em Mon, 23 Mar 2009 16:20:08 -0300, Hugo Palma > >> <hugo.m.pa...@gmail.com> > >>>>> escreveu: > >>>>> > >>>>>> Is there a way to execute some javascript right after a zone > >> update is > >>>>>> performed ? I can't seem to find a place where i can register > to > >> listen > >>>>>> for an ajax call return. > >>>>> Well, Prototype has a global way to provide these callbacks: > >>>>> http://www.prototypejs.org/api/ajax/options. If you have more > than > >> one zone > >>>>> in a single page, I don't know how you would do that. > >>>>> > >>>> ------------------------------------------------------------------ > -- > >> - > >>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > >>>> For additional commands, e-mail: users-h...@tapestry.apache.org > >>>> > >>> > >>> > >>> -- > >>> Thiago H. de Paula Figueiredo > >>> Independent Java consultant, developer, and instructor > >>> Consultor, desenvolvedor e instrutor em Java > >>> http://www.arsmachina.com.br/thiago > >>> > >>> ------------------------------------------------------------------- > -- > >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > >>> For additional commands, e-mail: users-h...@tapestry.apache.org > >>> > >>> > >> > >> > >> -- > >> Howard M. Lewis Ship > >> > >> Creator Apache Tapestry and Apache HiveMind > >> > >> -------------------------------------------------------------------- > - > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > >> For additional commands, e-mail: users-h...@tapestry.apache.org > >> > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org