Hello adam, Thx... I have tried that.. but problem is that, somehow, the original Array[] object does not get populated when you submit the page .... I'll investigate more and get back to the list nxt week.. I m pretty busy on other things at the moment..
Thx and regards marco -----Original Message----- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: 21 April 2006 16:16 To: Struts Users Mailing List Subject: Re: Can struts do it / 2? Marco Mistroni on 21/04/06 11:23, wrote: > i cant manage to populate back to the Action class,.. since I will have an > array of DTO that needs to be submitted from the page. > > The crucial problem that I am having is mainly that within the > logic:iterate, for each 'row' I need to create an input parameter that is > associated to a property of type array[] > > In pseudocode, it would be like this > > <logic:iterate> > .. <html:checkbox property="x"/> > </logic:iterate> > > > And that should generate a checkbox for each row. > > I cannot manage how to do that... I m sure someone has already had this > problem... My usual approach is to find an example that I did before, as on Blue Peter, that kids show, but I don't have my old code library on me - there must be an example of how to use logic:iterate with checkboxes somewhere. The key to working these things out from scratch is to check what the HTML looks like. The example above will just produce the same piece of HTML for the checkbox over and over. Doesn't the indexing attribute come into play here? The docs say "Valid only inside of logic:iterate tag. If true then name of the html tag will be rendered as "id[34].propertyName". Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag." What HTML comes out when you do that? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]