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 what struts tld syntax is for HTML OPTION ? 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 "what struts tld syntax is for HTML OPTION ?" Watch "what struts tld syntax is for HTML OPTION ?" New topic
Author

what struts tld syntax is for HTML OPTION ?

steve francisco
Ranch Hand

Joined: Jan 26, 2005
Posts: 46
I have a java bean containing a Colletion of names, and I need this collection of String names to be shown in the html <OPTION> list. If I use normal JSP to write it, I need to loop through the collection and append it to syntax <OPTION>...

Is there a simple struts tld syntax that I can simply grab the collection and "feed" into the "OPTION" ?
sanat
Ranch Hand

Joined: Dec 08, 2004
Posts: 111

See this article

http://struts.apache.org/userGuide/struts-html.html#optionsCollection

hope this helps.
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
look at the <html ptions> tag, note the 's', not the <html ption> tag. this tags takes a collection to generate dropdown items.


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
 
Consider Paul's rocket mass heater.
 
subject: what struts tld syntax is for HTML OPTION ?
 
Similar Threads
why my application can't detect struts tld files ?
How to populate html:select
help on html:select for default value
Struts - View html:select
JasperException: Cannot find bean under name contractors