Hi there,

I have a Collection (foodGroups) that I am displaying in a html:select tag
via html:optionsCollection. So I have:

  <nested:select property="foodGroupId" >
    <html:option value=""/> 
    <nested:optionsCollection property="foodGroups" value="foodGroupId"
label="name"/> 
  </nested:select>

So far pretty standard. What I want to do is, rather than send the id in the
value field, send the actual bean. So, in my action form I would like to
save selected item/value to:
private FoodGroup foodGroup;

Instead of:
private String foodGroupId;

Is it possible to use something like "Indexed" that other struts tags use?
So the value being sent through would look like "foodGroups[1]" and then
save the selected item to "foodGroup"?

And thoughts more than welcome. Oh, and I am using struts 1.3.

Many Thanks,
Simon.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to