Stephen Turner wrote:
Hello,

I'm trying to get objects placed in a List using the type conversion functionality built into Struts 2 (2.0.14)/Java 1.4. The bean that should be in the list is called "Grocery", with attributes "name" and "quantity". My action class has a List called "groceries".

I have a conversion properties file set up like this:

Element_groceries=mypackage.Grocery

The JSP has this:

      <s:textfield name="groceries(0).name" label="Name" />
      <s:textfield name="groceries(0).quantity" label="Quantity" />
      <s:textfield name="groceries(1).name" label="Name" />
      <s:textfield name="groceries(1).quantity" label="Quantity" />

Use brackets for arrays/lists.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to