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.