tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thermus <msch...@gmail.com>
Subject Re: What's the easiest way to implement two dependent select lists ?
Date Mon, 08 Dec 2008 01:20:28 GMT

I agree there must be a better way to do it with a Tapestry component, but
I'd probably do it as you described (it would only be a trivial amount of
JS).  Again, I'm curious what the Tap experts would do.

The zone solution has been suggested for recent versions but doesn't appear
useful in this case.  You might want to reignite these threads:

http://www.nabble.com/Updating-a-zone-within-a-form---td18769907.html
http://www.nabble.com/Updating-a-zone-within-a-form---td18769907.html 

http://www.nabble.com/-T5--AJAX-and-partial-updates-of-forms----Zone-AjaxFormLoop-FormInjector-FormFragment-and-the-like--td19664541.html
http://www.nabble.com/-T5--AJAX-and-partial-updates-of-forms----Zone-AjaxFormLoop-FormInjector-FormFragment-and-the-like--td19664541.html




HugoPalma wrote:
> 
> I'm already using the OnEvent component. Still, because the model of the 
> select list i want to update is calculated server-side i need to pass it 
> in json to the client, parse it again in javascript and then update the 
> select input. This does work but i feel that there should be a simpler 
> way of doing this, maybe using zones.
> 
> thermus wrote:
>> I'm a Tapestry novice, but you may want to have a look at 
>> http://code.google.com/p/tapestry5-components/ t5components .  It allows
>> you
>> to add a mixin to components to respond to an OnChange event with AJAX
>> (see: 
>> http://87.193.218.134:8080/t5c-demo/oneventpage this  and 
>> http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/mixins/OnEvent.html
>> this  for details).  You could then change the data model for the other
>> select component with a tiny bit of JavaScript in the onCompleteCallback
>> function.  
>>
>> I'm curious how a Tapestry expert would handle it.
>>
>>
>> HugoPalma wrote:
>>   
>>> I have a very usual use where in a form i have two selects, and when the
>>> user selects a value on one the values on the second should be filtered
>>> accordingly.
>>> As the Select component doesn't support ajax out-of.the-box i see myself
>>> forced to implement a lot of plumbing and javascript stuff.
>>>
>>> Still, i feel that this kind of use case should be much easier to
>>> implement.
>>> Maybe i'm missing something.
>>> I'd like to hear some ideas about how u would handle this.
>>>
>>> Thanks.
>>>
>>>
>>>     
>>
>>   
> 
> 

-- 
View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-implement-two-dependent-select-lists---tp20859735p20888201.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Mime
View raw message