Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Struts Drop Down Question

  • 14-12-2005 06:53PM
    #1
    Closed Accounts Posts: 73 ✭✭


    I have a combo which displays the name of an object and then holds the id and sends it to the form.
    Is there any way that i can show in the drop down list more than one value
    eg A flight Array ( id, depAir, destAir)
    The code i have working looks like this
    <html:select property="flightID">
    <html:options collection="flights" porperty="flightID" labelProperty="depAir">
    </html:select>
    If i can i would like to get destAir showing as well in se dropdown, and id in the textbox


Comments

  • Registered Users, Registered Users 2 Posts: 1,186 ✭✭✭davej


    I don't think there is a built in way to do this using a standard array and the struts taglib.

    Perhaps you could create a specific getter for your label in a flight form object that returns the values you want concatenated together?

    Also I suggest you look into using the JSTL taglibs in conjunction with (or instead of) the Struts taglibs..

    davej


Advertisement