Actually, replace the first link with this simpler example:
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/selectmore1
Geoff
On 27/06/2013, at 7:38 PM, Geoff Callender wrote:
> Some random ides that I haven't tried...
>
> I think you'll need to combine this:
>
>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/selectdependency1
>
> with this:
>
>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/eventlinksinaloop
>
> To get the id of the entity in the row, try:
>
> - Make the Select encoder include the id in the value that it
> encodes/decodes; or
> - Use zone per row, include the id in the zone id (see the second
> example) and in the event handler you might be able to get clientId from the
> zone.
>
> Geoff
>
> On 27/06/2013, at 3:14 AM, Ben Titmarsh 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: [email protected]
For additional commands, e-mail: [email protected]