Re: Auto-updating a drop-down list

2006-08-02 Thread Waimun Yeow

Jesse and Nick,

Thanks for the suggestions (1) EventListener (2) DynamicSelectionList.

I am currently using Tap 3.03 and perhaps this is a good chance to  
upgrade if I want to take advantage of 4.1 features. But I am  
concerned whether if I need to make a lot of changes to the way I  
configured the application to integrate Spring with Tapestry in  
section 15.4.2.3 at  (http://www.springframework.org/docs/reference/ 
webintegration.html).


The DynamicSelectionList is also a good option since you said it  
works with T3 (with tweaks). Perhaps you can point me to an example  
and also provide the tweaks in order for it to work.



Thanks,
waimun

Re: Auto-updating a drop-down list

2006-08-02 Thread Nick Westgate

Hi Waimun.

DynamicSelectionList works fine, but I needed to change it a bit for my use.

Just download it and see if it does what you want. Shing Hing Man (who is on
this list) wrote it, and has docs and online demos here:
http://lombok.demon.co.uk/tapestryDemo/welcome?service=page/DynamicSelectionList

If you need to change it, email him (or me) about it. ;-)

Cheers,
Nick.


Waimun Yeow wrote:

Jesse and Nick,

Thanks for the suggestions (1) EventListener (2) DynamicSelectionList.

I am currently using Tap 3.03 and perhaps this is a good chance to  
upgrade if I want to take advantage of 4.1 features. But I am  concerned 
whether if I need to make a lot of changes to the way I  configured the 
application to integrate Spring with Tapestry in  section 15.4.2.3 at  
(http://www.springframework.org/docs/reference/ webintegration.html).


The DynamicSelectionList is also a good option since you said it  works 
with T3 (with tweaks). Perhaps you can point me to an example  and also 
provide the tweaks in order for it to work.



Thanks,
waimun


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Auto-updating a drop-down list

2006-08-01 Thread Jesse Kuhnert

You can do something like the following:

-) Define your two select lists, I'll leave that part out..But let's assume
they are named listA and listB. We'll also assume that a form exists named
form1.

-) In your page or component, define a method that looks somewhat like this:

@EventListener(targets = listA, events = onchange, submitForm=form1)
public void listASelected(IRequestCycle cycle)
{
  cycle.getResponseBuilder().updateComponent(listB);
}

More documentation can be found here,
http://tapestry.apache.org/tapestry4.1/ajax/EventListener.html.


On 8/1/06, Waimun Yeow [EMAIL PROTECTED] wrote:


Hi,

I would like to find out how I can auto-update a drop down list in a
form when another drop down list changes. For example, in a HTML
form, I have two select elements. Let's say the first select has
a list of department names and upon selecting one, it updates the
second select with a list of employees for the selected department.
Also, the values of the two select elements are retrieved from a
database table.

What is the typical approach of dealing with this type of problem? Is
there any article that explains this? I would appreciate if anyone
who has dealt with a similar problem above provide me with  some
suggestions or pointers. Thanks.

-waimun

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.