As you use your own zone update mechanism instead of native(e.g. EventLink
component)  you can provide js-callback for ajax request as you mention
before.
To update zone use something like this:

var zone = Tapestry.findZoneManager(spec.zoneId);
function rowClickCalback(response) {
    zone.processReply(response);
}

Or you can update zone with T5 js api:

var zone = Tapestry.findZoneManager(spec.zoneId);
zone.updateFromURL(url, parameters);



On Fri, Sep 28, 2012 at 12:19 PM, nquirynen <nat...@pensionarchitects.be>wrote:

> Hi,
>
> I have a component (grid) where I added a javascript onclick event on my
> rows where I do an ajax (jquery) request to a component event:
>
> $.get('${onRowClickEventLink}');
>
> This all works fine, but I also want to update some zones after this event
> so I added this to the event method:
>
> void onRowClick() {
> ...
> ajaxResponseRenderer.addRender(aZone);
> }
>
> In Firebug I do see in the response the following:
>
> "zones" : {
>     "aZone" : ...
> }
>
> But the zone does not get updated.
> Now I found a workaround where I added a javascript callback function on
> the
> $.get request where I do the following:
>
> function rowClickCalback(r) {
>    aZone.html(r.zones.aZone);
> }
>
> This does work and makes the zone update, but it does not feel like I am
> doing things the right way. I'm pretty new to Tapestry with Ajax, so any
> insight in what I am doing wrong is appreciated.
>
> Thanks,
> Nathan
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Zone-update-after-ajax-request-to-component-event-tp5716538.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
BR
Ivan

Reply via email to