• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what struts tld syntax is for HTML OPTION ?

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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" ?
 
Ranch Hand
Posts: 111
Mac Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See this article

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

hope this helps.
 
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic