I am having a similar problem to Ancat:
I have an arrayList named 'students' in an action. I use this action to
load values for a .jsp which contains the following code:
This displays my arrayList correctly, but when I submit to my action, I
cannot retrieve the modified
> 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
>
> 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.
>
> L
>
> Struts 2?
>
Sorry, yes I am using Struts 2.
>
> Er, what other forums would you have tried?
>
Varied coding forums that happened to have a
struts/hibernate/whatever-else subsection
>
> Use map- (and/or) index-based field names. Trivial with S2, don't actually
> remember for S1.
>
I may not
Perhaps this is the wrong place to seek help, and perhaps there is no
direct solution to my problem, but I have to try.
I am loading a simple set of objects representing users in an action; they
have names, passwords, etc., all loaded from a database.
I am displaying the elements of this set in a
5 matches
Mail list logo