struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: Type Conversion and Lists
Date Fri, 25 Sep 2009 19:34:09 GMT
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-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message