Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what struts tld syntax is for HTML OPTION ?

 
steve francisco
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 111
Eclipse IDE Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this article

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

hope this helps.
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
look at the <html ptions> tag, note the 's', not the <html ption> tag. this tags takes a collection to generate dropdown items.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic