Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Struts Drop Down Question

Options
  • 14-12-2005 6: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 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