Minerva CC wrote:
Hi,
I want to generate indexed html elements via iterator. In Struts 1, I would do it as follows: <logic:iterate name="namesForm" property="names" id="name">
    <html:text name="name" property="firstname" indexed="true" size="30"/>
    <html:text name="name" property="lastname" indexed="true" size="30"/>
</logic:iterate>
Then Struts 1 will generate the output like this: <input type="text" name="name[0].firstname" size="30" value="">
<input type="text" name="name[0].lastname" size="30" value="">
<input type="text" name="name[1].firstname" size="30" value="">
<input type="text" name="name[1].lastname" size="30" value="">
.... Now, how can I do the same with Struts 2? I tried <s:iterator> and <s:textfield>. But, they don't have have equivalent attributes. Is there anyone who has an idea how to do it?

What did you try? s:iterator and s:textfield seem like the right pair of tags to use. I think Struts 2 will take care of the property indexing for you automatically (could be wrong on that though).

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to