This idea works nicely but remember if you have pages of any size the user experience will suffer. As an example Bugzilla does it using dynamic javascript and it still has annoying pauses, a page load would be worse.
Also, you should have an additionaly piece of javascript to put the cursor back where it was when the page was submitted. Edgar > -----Original Message----- > From: Amit Kirdatt [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 22, 2003 4:24 PM > To: 'Struts Users Mailing List' > Subject: RE: about dependent lists > > > I am assuming both lists are present on the same page! > If so on the first list have a onChange javascript event > which calls a function that submits the page. When the page > is submitted you get the value the user selected on the first > list. Use this value to populate the second list in the form, > put the form back into whichever scope you had it and forward > the Action control to the same page. > > --Amit > > -----Original Message----- > From: victor gu [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 22, 2003 1:43 PM > To: [EMAIL PROTECTED] > Subject: about dependent lists > > > Hi, Guys: > > I have two lists, when I select an item from the first > list, the second list will be populated based on the > selected item. The results will be got from database > in action class. The first list will be pre-populated, > not the second. Here are my questions: do I need > another action class taking care of selecting part? > Once I select the item from the first list, I will get > this item in action class, then get results, how can I > send them back and populate the second list? Or There > are other better and easier ways to achieve this? > > thanks, > > victor > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design > software http://sitebuilder.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > This e-mail, including attachments, may include confidential > and/or proprietary information, and may be used only by the > person or entity to which it is addressed. If the reader of > this e-mail is not the intended recipient or his or her > authorized agent, the reader is hereby notified that any > dissemination, distribution or copying of this e-mail is > prohibited. If you have received this e-mail in error, please > notify the sender by replying to this message and delete this > e-mail immediately. > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]