Thanks Lance,

Here is an updated effort using tapestryZone.  This is much better as the zone 
was not being refreshed before!

                 var parameters = {};
                 parameters["t:zoneid"] = gridZone;
                 
                 $(document).find(".cubeAjaxUpdate").change(function() {    
                    $("#gridZone").tapestryZone("update", {
                        url: 
"/editcube:"+$(this).data("event")+"/"+$(this).data("cardid")+"/"+$(this).val()+"?t:ac=1",
                        params: parameters
                    });
                });

However, I'm unsure how I could use component resources to generate the url on 
the server side.  I presume you are referring to CreateEventLink 
(http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ComponentResourcesCommon.html#createEventLink%28java.lang.String,%20java.lang.Object...%29).
  However at the time I would generate this link I don't have the value of the 
field (the second context param) so how can I generate the whole URL like you 
describe?

> Date: Wed, 21 Aug 2013 17:18:08 +0100
> Subject: RE: Submitting id & value of a t:select component onChange
> From: lance.j...@googlemail.com
> To: users@tapestry.apache.org
> 
> 1. You should not generate your URL's clientside. Instead, generate via
> ComponentResources serverside and add a "data-url" attribute instead.
> 
> 2.  When I look at the tapestry-jquery page here
> http://tapestry5-jquery.com/mixins/docsbind
> 
> I can see an include for bind.js (
> http://tapestry5-jquery.com/assets/40a195d04cdc0bf0/app/assets/mixins/bind/bind.js
> )
> 
> In bind.js, I can see that tapestry-jquery uses element.tapestryZone(…) to
> update a zone. I'd probably do the same instead of using $.ajax(…)
                                          

Reply via email to