This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes How to use select tag as filter (like: parent child)? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to use select tag as filter (like: parent child)?" Watch "How to use select tag as filter (like: parent child)?" New topic
Author

How to use select tag as filter (like: parent child)?

prakash. rajeev
Greenhorn

Joined: Feb 17, 2010
Posts: 15
I want to use <html:select> tag as a filter between two select tag.
I want two list boxes in which
first act as a parent to the other list box.

It means
for example one list box contains countries and the other list box contain their respective cities.
So,when i click first list box, like: "India" it should display "delhi,mumbai,kolkata,chennai,bangalore,etc".
or if i click "USA" it should display "Washinton dc,newyork,new jercy,california,las vegas,etc".
Whether i need a backend support also for this.


i want to do this in struts1.
Any solution is highly appreciable.
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
Hi,

There is no build in provision for this feature in struts but you can do this programatically.
ummmm like,

on change of country dropdown submit form and in action change city dropdown bean list according to country you had selected.


Thanks,
Shailesh
raj malhotra
Ranch Hand

Joined: Feb 22, 2007
Posts: 285
Try double select. But it is for struts2. May be you can look into its source code.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use select tag as filter (like: parent child)?
 
Similar Threads
Strut2 + doubleselect Tag
Struts 1.1: Help needed with html:select, html:options, html:optionsCollection
How to get last selected value in list box?
Pagination In struts with oracle database
Displaying record from combo box