Hi all,

I have a collection of "Institute" objects the have (beside others) the
properties "id" and "name" supposed to be used as value content within an
select element.

The question is how to expose the id property to the value attribute of the
option tag in  order to receive sth. like

<option value="17">An institute</option>


I try it this way but have no clue what to do with the value attribute:

<form:select size="5" property="instituteId">
   <logic:iterate id="element" name="instituteList">
        <form:option value="??" ><bean:write name="element" property="name"
/>
        </form:option>
   </logic:iterate>
</form:select>

I do not like the options tag as it require to my understanding separate
collections for the ids and the values.

Kind regards,
Stefan Wesner.

Reply via email to