Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Drop Down List

 
Ger Gleeson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you show more than one field of a drop down list eg. I have a flight collection and i want to be able to select the flightID from a drop down list while also being able to see the destination and departure airports.
I am currently using a <html:select> and <html ptions> but cant seem to figure it out, please help
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Struts forum.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the <select> control only allows you to display a single string, you will have to concatenate several pieces of data into a single field. For example, if the bean you're using to populate the options has a getLabel() method that's currently showing "1234", you need to modify it so that it produces: "flt: 1234 depart:Los Angeles arrive: New York City".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic