• 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

Dynamically generating styleClass value in html:options

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as I can see, you can only specify the same styleClass value for all html:options in a collection. I'd like to specify the same value for the "styleClass" attribute as the "property" attribute. Is there a way I can do this either with struts tags or jstl? Thanks for any help.

I'd like to do something as the below example. Note, that the example renders a "class" attribute of the literal string "value" instead of the desired value of getValue() in the LabelValueBean in the labelColorsList.

<html:options collection="labelColorsList" styleClass="value" property="value" labelProperty="label" />
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic