RE: Submitting id & value of a t:select component onChange

2013-08-22 Thread Lance Java
If you are generating a placeholder serverside and replacing it clientside, there's no need to use a request parameter. You can just use the event context. You only need a request parameter when appending to the URL in javascript rather than replacing a token. Note that if you have ValueEncoders

RE: Submitting id & value of a t:select component onChange

2013-08-22 Thread Ben Titmarsh
pdate").change(function() { $("#gridZone").tapestryZone("update", { url: $(this).data("url").replace('[VALUE]', $(this).val()), params: parameters });

RE: Submitting id & value of a t:select component onChange

2013-08-21 Thread Lance Java
You'll need to append a request parameter to a serverside generated event url and use @RequestParam serverside to get the value in the event

RE: Submitting id & value of a t:select component onChange

2013-08-21 Thread Ben Titmarsh
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,

RE: Submitting id & value of a t:select component onChange

2013-08-21 Thread Lance Java
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

RE: Submitting id & value of a t:select component onChange

2013-08-21 Thread Ben Titmarsh
request.done(function (response, textStatus, jqXHR){ $("#savingUpdate").hide(); }); }); > Date: Wed, 21 Aug 2013 15:55:06 +0100 > Subject: Re: Submitting id & value of a t:select component

Re: Submitting id & value of a t:select component onChange

2013-08-21 Thread Lance Java
tapestry-jquery has rewritten Tapestry's javascript and I'm not too familiar with it. I'm sure there's a function in there to trigger a zone update. On 21 Aug 2013 15:26, "Lance Java" wrote: > You could use data attributes and some clientside jquery just like a > non-tapestry app. > > TML > >

RE: Submitting id & value of a t:select component onChange

2013-08-21 Thread Ben Titmarsh
: 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 > > /> > >

Re: Submitting id & value of a t:select component onChange

2013-08-21 Thread Lance Java
You could use data attributes and some clientside jquery just like a non-tapestry app. TML JS $("#myGrid").find("select").change(function() { var select = $(this); var foo = select.data("foo"); var bar = select.data("bar"); doStuff(foo, bar); };