This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes To Create A dynamic Drop Down List using Struts Tag Libraires. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "To Create A dynamic Drop Down List using Struts Tag Libraires." Watch "To Create A dynamic Drop Down List using Struts Tag Libraires." New topic
Author

To Create A dynamic Drop Down List using Struts Tag Libraires.

SmiR Raj
Greenhorn

Joined: Nov 29, 2005
Posts: 4
I have a list of names in the ApplicationResources.properties file. Can I use any Struts Tag to iterate the property file and retreive the values.
Example I have
label.name1 = norcal
label.name2 = Phoenix

Is there any way by which I can have a dynamic list box which has the two values "norcal" and "phoneix". If i add a third value "Seattle" the list box should be populated without any change in the jsp.

Can I do this without setting any request or session Attributes?
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
For property file clarification see you other thread
http://www.coderanch.com/forums/.

As far as dynamic listbox is concerned. Yes you can do that. Just add one more element in your collection. It will show up all during iteration.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60767
    
  65

Moved to Struts.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Consider Paul's rocket mass heater.
 
subject: To Create A dynamic Drop Down List using Struts Tag Libraires.
 
Similar Threads
Combobox Items Lookup
Iteration in structs
dynamic list box issue
creating dymic optionvalues in select box from arraylist values in jsp
problem with display tag