Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Struts Drop Down Question

  • 14-12-2005 05: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
Advertisement