Hi Tim,
On 2/26/07 5:26 PM, "Tim Azzopardi" <[EMAIL PROTECTED]> wrote: > (I'm using a heaviliy modified xhtml theme that required me to use explicit > <tr> tags in case anybody is wondering) First take a look at http://www.vitarara.org/cms/node/85 and see if that might eliminate the need for you to do explicit <tr> tags. > This generates, for example, for one of the fields in the the table > <s:textfield name="prLines[0].quantity" value="23" size="8"> > > And this works a treat, populating the collection in the action. Great! This will work fine, as long as you save the collection in a conversation or the session between hits, or the ordering of the collection is determinant and you can always assure that element 0 will always be the same. You probably already know all of that, but just in case. > Generating the indexes is not that hard, but I'm in a situation now where I > am moving rows from one table to another via dhtml and of course managing > the indexes is fiddly. > > Is there a better/simpler way of managing multiple fields (possibly without > being forced to maintain the indices)? Take a look at http://www.vitarara.org/cms/node/81. That ought to work around your issue. This would always have you indexing back to an entity by id in the backing Map. It's safer than just indexing into an ordered collection. > Also, is there a way of using the struts2 field validation framework with > multiple fields? You got me on that one. I've done some validation in this style, but the validation error needs to reference the generated name of the field to get the error back to the right place. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]