Hi Ben! AFAIR you can pass a context but this value remains constant and is independent from the selection made. So at the very end I used bind like you did. Same problem applies to Checkboxes, so I do not know if Tapestry generally misses something or we simply did not find it yet...
Why did you think there is a "dramatic" performance impact? Jens Sent from my iPhone On 26.06.2013, at 19:14, Ben Titmarsh <ben.titma...@hotmail.co.uk> wrote: > Hi All, > > I am generating ~100 select items in a loop and would like to listen for the > ajax onChange event for each of these. I am getting the event successfully > using the following: > > <t:zone t:id="gridZone"> > ... > <t:select t:id="colourProfileOverride" > t:value="cubeCard.colourCombinationOverride" t:zone="gridZone"> > ... > </t:zone> > > public Object onChangeFromColourProfileOverride() { > ... > return gridZone.getBody(); > } > > The value is set as expected on the cubeCard.colourCombinationOverride > object, however in order to know which select was updated I need some sort of > context value. > > I have played around with the jquery/bind mixin and can get it to do what I > would like but it involves setting bind.callback="function(event,ui,url) { > url.addContext(event.target.value); } on each of my select components. This > significantly reduces client side performance. > > So I'd like to know if anyone has figured out a way to pass a context value > in onChange Ajax requests from select components? My ideal situation would > be to end up with something along these lines: > > <t:select t:id="colourProfileOverride" > t:value="cubeCard.colourCombinationOverride" t:context="myId" > t:zone="gridZone"> > > public Object onChangeFromColourProfileOverride(Integer myId) { > ... > } > > Thanks, > Ben. > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org