WebWork can't do complex objects like that, it just doesn't know how to construct them. That is something I'm looking in to in the future, but no promises.
WebWork can do something like this though: <input type="hidden" name="foo" value="1"/> <input type="hidden" name="foo" value="2"/> <input type="hidden" name="foo" value="3"/> and your action can have setFoo(long[] foo) { // this will be [1,2,3] } ----- Original Message ----- From: "Marco Papini" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 10, 2002 5:57 AM Subject: [OS-webwork] Array of dataobject as result of a submit form with WW+Velocity > Hi all, > > I'm wondering if there's a way to create a form that creates multiple > record in a table using an array of data object. > I'll try to explain. I've the need to create a invoice management form. > The rows of the invoice are copied from order rows. > > The invoice row table is something like (invoiceid, productid, price). > The form is built using order row data. > I've tried this: > > <form action="invoice.add.action" method="post"> > #foreach( $order in $orderList ) > <input type="hidden" name="invoiceData/productid" > value="$order.data.productid> > <input type="textbox" name="invoiceData/price" value=""> > #end > <input type="submit" value="Add"> > </form > > I've added a property InvoiceData[] invoiceData with getter/setter, but > it's never invoked. > I know I can use different array one for each property, but I'm looking > for a more flexible solution... > > Any thougths ? > > Thanks in advance > > -- > > Marco Papini <[EMAIL PROTECTED]> > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork