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/03/23 20:20:08 UTC

Executing javascript on ajax call return

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.

Thanks.

Re: Executing javascript on ajax call return

Posted by Hugo Palma <hu...@gmail.com>.
I couldn't find an issue for this, so i created one
https://issues.apache.org/jira/browse/TAP5-624

On Mon, Mar 23, 2009 at 11:19 PM, Thiago H. de Paula Figueiredo <
thiagohp@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
>
>

Re: Executing javascript on ajax call return

Posted by Hugo Palma <hu...@gmail.com>.
That would be great.
Is there an issue already for this ?

On Tue, Mar 24, 2009 at 12:53 AM, Howard Lewis Ship <hl...@gmail.com>wrote:

> 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 <hugo.m.palma@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
>
>

Re: Executing javascript on ajax call return

Posted by Inge Solvoll <in...@gmail.com>.
I agree too, that would make zones way more useful!

On Tue, Mar 24, 2009 at 2:01 AM, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> Em Mon, 23 Mar 2009 21:53:55 -0300, Howard Lewis Ship <hl...@gmail.com>
> escreveu:
>
>  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.
>>
>
> +1!
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> 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
>
>

Re: Executing javascript on ajax call return

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Mon, 23 Mar 2009 21:53:55 -0300, Howard Lewis Ship <hl...@gmail.com>  
escreveu:

> 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.

+1!

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
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


Re: Executing javascript on ajax call return

Posted by Fernando Padilla <fe...@alum.mit.edu>.
Howard, since you're into doing quick fixes/enhancements. :)

could you please add a "loading" effect for zones? :)

since at the moment other developers in our company have added local 
hacks to get a little loading effect going (simple hour glass or 
somesuch), but I would love to rip out all of our hackish code, if 
tapestry can support it natively. :)

it would be the first motivator for more zone events. I would just add 
loading effects :)  And you can leave the show/update ones.  I would 
even add loadingEnd, showEnd, updateEnd, to allow you to chain effects 
together easier, for transitions: slide right, then fade in. or fade 
out, then slight in left, etc.




.loading {
	background-image: url( 
http://ssres.s3.amazonaws.com/img/bg/loadingCircle.gif );
	background-repeat: no-repeat;
	padding-top: 5px;
	min-height: 20px;
}


Blower, Andy 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
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Executing javascript on ajax call return

Posted by Hugo Palma <hu...@gmail.com>.
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
>
>

RE: Executing javascript on ajax call return

Posted by "Blower, Andy" <An...@proquest.co.uk>.
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


Re: Executing javascript on ajax call return

Posted by Hugo Palma <hu...@gmail.com>.
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
>
>

RE: Executing javascript on ajax call return

Posted by "Blower, Andy" <An...@proquest.co.uk>.
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


Re: Executing javascript on ajax call return

Posted by Fernando Padilla <fe...@alum.mit.edu>.
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


RE: Executing javascript on ajax call return

Posted by "Blower, Andy" <An...@proquest.co.uk>.
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


Re: Executing javascript on ajax call return

Posted by Howard Lewis Ship <hl...@gmail.com>.
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


Re: Executing javascript on ajax call return

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
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


Re: Executing javascript on ajax call return

Posted by Fernando Padilla <fe...@alum.mit.edu>.
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


Re: Executing javascript on ajax call return

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
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.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
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