You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by George Christman <gc...@cardaddy.com> on 2011/12/27 18:05:27 UTC

Got5-JQuery - Tapestry.Zone_Updated_Event

I've just recently migrated our project to Got5-JQuery. With prototype, I had
a script in afterRender to call a js method once my zone completed it's
refresh. With Got5-JQuery, this function no longer works. I'm wondering if
anybody knows how to get this to work with Got5-JQuery?

old script

     void afterRender() {
        javaScriptSupport.addScript(
            "$('%s').observe(Tapestry.ZONE_UPDATED_EVENT, function() { "
                + "$('zoneUpdater')"
                + "});",
        shiptoZone.getClientId()
                );
    } 

Thanks in advance. 


--
View this message in context: http://tapestry.1045711.n5.nabble.com/Got5-JQuery-Tapestry-Zone-Updated-Event-tp5103466p5103466.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Got5-JQuery - Tapestry.Zone_Updated_Event

Posted by George Christman <gc...@cardaddy.com>.
Hi Landgeo, 

Your code should look something like this

    void afterRender() {
            js.addScript("$('#%s').bind(Tapestry.ZONE_UPDATED_EVENT,
function() { "
                    + "yourMethod()"
                    + "});", yourZone.getClientId());
    }

Hope that helps. 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Got5-JQuery-Tapestry-Zone-Updated-Event-tp5103466p5630913.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Got5-JQuery - Tapestry.Zone_Updated_Event

Posted by Emmanuel DEMEY <de...@gmail.com>.
hi Christian

There is no event triggered for the addrowlink event.

Manu

2012/1/18 George Christman <gc...@cardaddy.com>

> Emmanuel, is there something similar that can be used with the addrow link
> for AjaxFormLoop?
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Got5-JQuery-Tapestry-Zone-Updated-Event-tp5103466p5155608.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emmanuel@gmail.com
http://emmanueldemey.fr

Twitter : @gillespie59

Re: Got5-JQuery - Tapestry.Zone_Updated_Event

Posted by George Christman <gc...@cardaddy.com>.
Emmanuel, is there something similar that can be used with the addrow link
for AjaxFormLoop?

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Got5-JQuery-Tapestry-Zone-Updated-Event-tp5103466p5155608.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Got5-JQuery - Tapestry.Zone_Updated_Event

Posted by Emmanuel DEMEY <de...@gmail.com>.
When the content of a zone is updated, tapestry-jquery.js trigger an event
( Tapestry.ZONE_UPDATED_EVENT ) for this current zone.
Then, you can catch this event for this zone, and execute a specific
function.

Here an example,
$("id of your zone").bind(Tapestry.ZONE_UPDATED_EVENT, function(){

    //your code

});

I hope I gave to you enough information.

Manu

2011/12/29 George Christman <gc...@cardaddy.com>

> Hi Manu,
>
> Thanks for the reply, would you help me to understand what I'm binding? I
> don't quit understand this just yet.
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Got5-JQuery-Tapestry-Zone-Updated-Event-tp5103466p5107794.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emmanuel@gmail.com
http://emmanueldemey.fr

Twitter : @gillespie59

Re: Got5-JQuery - Tapestry.Zone_Updated_Event

Posted by George Christman <gc...@cardaddy.com>.
Hi Manu, 

Thanks for the reply, would you help me to understand what I'm binding? I
don't quit understand this just yet. 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Got5-JQuery-Tapestry-Zone-Updated-Event-tp5103466p5107794.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Got5-JQuery - Tapestry.Zone_Updated_Event

Posted by Emmanuel DEMEY <de...@gmail.com>.
Hi

The observe method does not exist in jQuery. You have to use the bind
method.  http://api.jquery.com/category/events/

Manu

2011/12/27 George Christman <gc...@cardaddy.com>

> Hi Emmanuel, I'm using 3.0.0. Thanks
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Got5-JQuery-Tapestry-Zone-Updated-Event-tp5103466p5103493.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emmanuel@gmail.com
http://emmanueldemey.fr

Twitter : @gillespie59

Re: Got5-JQuery - Tapestry.Zone_Updated_Event

Posted by George Christman <gc...@cardaddy.com>.
Hi Emmanuel, I'm using 3.0.0. Thanks

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Got5-JQuery-Tapestry-Zone-Updated-Event-tp5103466p5103493.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Got5-JQuery - Tapestry.Zone_Updated_Event

Posted by Emmanuel DEMEY <de...@gmail.com>.
Hi

Wich Tapestry5-jQuery version do you use ?

Manu

2011/12/27 George Christman <gc...@cardaddy.com>

> I've just recently migrated our project to Got5-JQuery. With prototype, I
> had
> a script in afterRender to call a js method once my zone completed it's
> refresh. With Got5-JQuery, this function no longer works. I'm wondering if
> anybody knows how to get this to work with Got5-JQuery?
>
> old script
>
>     void afterRender() {
>        javaScriptSupport.addScript(
>            "$('%s').observe(Tapestry.ZONE_UPDATED_EVENT, function() { "
>                + "$('zoneUpdater')"
>                + "});",
>        shiptoZone.getClientId()
>                );
>    }
>
> Thanks in advance.
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Got5-JQuery-Tapestry-Zone-Updated-Event-tp5103466p5103466.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emmanuel@gmail.com
http://emmanueldemey.fr

Twitter : @gillespie59