Thanks Lance, this looks great!  I've not written any raw jQuery Ajax code, in 
the past I've just left this all to Tapestry.  Presumably I should be using 
this: http://api.jquery.com/jQuery.ajax/ Or is there a preferred approach?

> Date: Wed, 21 Aug 2013 15:26:56 +0100
> Subject: Re: Submitting id & value of a t:select component onChange
> From: lance.j...@googlemail.com
> To: users@tapestry.apache.org
> 
> You could use data attributes and some clientside jquery just like a
> non-tapestry app.
> 
> TML
> <t:grid row="current" id="myGrid">
>    <p:someCell><t:select … data-foo="current.foo" data-bar="current.bar" …
> /></p:someCell>
> </t:grid>
> 
> 
> 
> JS
> $("#myGrid").find("select").change(function() {
>    var select = $(this);
>    var foo = select.data("foo");
>    var bar = select.data("bar");
>    doStuff(foo, bar);
> 
> };
                                          

Reply via email to