You're not relating the fields to the students collection in any way.

You'd need a collection of students in your action (probably mapped by ID),
and each field would use something like "student[id].firstname" as the field
name.

The code you've provided (below) will just create a bunch of fields named
"lastName", "firstName", etc. rather than being associated with your
"students" set.

Dave

--- [EMAIL PROTECTED] wrote:
> > You don't need to 'parse the stream', Struts does that for you. Struts
> > will call the setters on the objects in your set to pass the form inputs
> > into them. In other words, the result you want to achieve is what
> > happens automatically, provided you specify your input fields correctly.
> 
> Hmmmm, thought I had tried that. How do I retrieve those objects then?
> 
> For example, in the first Action I create a set named 'students', and fill
> it with Student objects.
> 
> In the .jsp, I iterate over the set of students, like so:
> (please ignore the table, this is just preliminary formatting, .css is on
> the way)
> 
> <s:form action="TheNextOne"
>    <table>
>       <s:iterator status="stat" value="students">
>          <tr>
>             <s:hidden name="userId" />
>             <td><s:property value="#stat.index + 1" />.</td>
>             <td><s:textfield name="lastName" /></td>
>             <td><s:textfield name="firstName" /></td>
>             <td><s:textfield name="userName" /></td>
>             <td><s:textfield name="userPassword" /></td>
>             </tr>
>          </s:iterator>
>       </table>
>       <s:submit/>
>    </s:form>


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

Reply via email to