You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Hugo Palma <hu...@gmail.com> on 2009/04/06 19:31:10 UTC

Re: Executing javascript on ajax call return

Well, i just got back to this issue and i can't seem to make it work again.
I can't remember the exact use case on which i tested this but i can't make
it work now.
Maybe i just wanted it to work so bad that i thought it was when i wasn't
:o(

On Tue, Mar 24, 2009 at 7:35 PM, Blower, Andy <An...@proquest.co.uk>wrote:

> Fantastic, might be worth removing the line "Currently, the partial page
> content that is rendered may not use an Environmental services. This is
> expected to change soon." from
> http://tapestry.apache.org/tapestry5.1/guide/ajax.html then.
>
> > -----Original Message-----
> > From: Hugo Palma [mailto:hugo.m.palma@gmail.com]
> > Sent: 24 March 2009 18:23
> > To: Tapestry users
> > Subject: Re: Executing javascript on ajax call return
> >
> > I've just tried using renderSupport on a partial page render and it
> > worked
> > great. I'm using 5.1.0.2-SNASHOT.
> >
> > On Tue, Mar 24, 2009 at 4:14 PM, Blower, Andy
> > <An...@proquest.co.uk>wrote:
> >
> > > 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:fern@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:hlship@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
> > > > >> <th...@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
> > > > >> <fe...@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
> > > > >> <hu...@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-unsubscribe@tapestry.apache.org
> > > > >>>> For additional commands, e-mail: users-
> > help@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-unsubscribe@tapestry.apache.org
> > > > >>> For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >>>
> > > > >>>
> > > > >>
> > > > >>
> > > > >> --
> > > > >> Howard M. Lewis Ship
> > > > >>
> > > > >> Creator Apache Tapestry and Apache HiveMind
> > > > >>
> > > > >> ----------------------------------------------------------------
> > ----
> > > > -
> > > > >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > >> For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > > -----------------------------------------------------------------
> > ----
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > >
> > > > -------------------------------------------------------------------
> > --
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>