Thanks Jim for link. Yeah, I have to upgrade to newer version 2.0.11.

On 11/1/07, Jim Cushing <[EMAIL PROTECTED]> wrote:
>
> It's not necessary to do declare 10 variables. Here's an example:
>
> http://struts.apache.org/2.x/docs/tabular-inputs.html
>
> By the way, Struts 2.0.11 is out, so Raguveer, you might want to
> upgrade. The answer to your particular question doesn't change, but
> there are some bug and security fixes you should have.
>
> On Nov 1, 2007, at 7:14 AM, John Doe wrote:
>
> > The simplest way (if I'have understood your problem right) is to
> > create 10
> > variables in your action class (with getters and setters of course)
> > and on
> > the form. So it'll be
> >
> > private String firstName1;
> > private String firstName2;
> > private String firstName3;
> > ...
> > private String firstName10;
> >
> > in the action class and :
> >
> > <s:textfield name="firstName1"  size="25" maxlength ="20"/>
> > <s:textfield name="firstName2"  size="25" maxlength ="20"/>
> > <s:textfield name="firstName3"  size="25" maxlength ="20"/>
> > ...
> > <s:textfield name="firstName10"  size="25" maxlength ="20"/>
> >
> > Struts fills action variables values automatically using reflection.
> >
> > On 11/1/07, Raghuveer Rawat <[EMAIL PROTECTED]> wrote:
> >>
> >> Hi, still looking for help.
> >>
> >>
> >> On 10/31/07, Raghuveer Rawat <[EMAIL PROTECTED]> wrote:
> >>>
> >>> Hi, I have form which allows user to invite other users. A user can
> >> invite
> >>> a max of 10 users at a time. A row contain First Name, Last Name,
> >>> and
> >> Email
> >>> Address.
> >>> How should I name these textfields (OGNL expression) and how
> >>> should I
> >>> retrieve these values in Action Class?
> >>>
> >>>
> >>> <table>
> >>>
> >>> <
> >>> tr>
> >>>
> >>> <td>First Name</ td>
> >>>
> >>> <td>Last Name</ td>
> >>>
> >>> <td>Email Address</ td>
> >>>
> >>> </tr>
> >>>
> >>> <tr>
> >>>
> >>> <s:textfield name="firstName"  size="25" maxlength ="20"/></td>
> >>>
> >>> <s:textfield name="lastName" size="25" maxlength ="20"/></td>
> >>>
> >>> <s:textfield name="email" size="25" maxlength= "20"/></td>
> >>>
> >>> </tr>
> >>>
> >>>  similarly 9 more rows like this.
> >>>
> >>> </table>
> >>>
> >>>
> >>>
> >>
> >
> >
> >
> > --
> > Best regards,
> > Bashmaкov Anton
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to