aspose file tools*
The moose likes Struts and the fly likes Struts Drop Down List Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Drop Down List" Watch "Struts Drop Down List" New topic
Author

Struts Drop Down List

Ger Gleeson
Greenhorn

Joined: Dec 14, 2005
Posts: 3
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

Joined: Jan 10, 2002
Posts: 61603
    
  67

Moved to the Struts forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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".


Merrill
Consultant, Sima Solutions
 
Don't get me started about those stupid light bulbs.
 
subject: Struts Drop Down List