----- Original Message -----
From: Sankha Das <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 4:54 AM
Subject: Form Bean


> Hi guys,
>
> I am a newbie in the Struts framework. I have to build a page where
> I have to show variable number of rows with each row having variable
number
> of columns.
> So obviously the number of elements( Drop down, text box, check box
> ) will appear in the screen will be dynamic. Now my question is how can I
> write the Form
> Bean class before hand where I don't know how many elements will be
> there in the screen. I need to provide fixed numberaccessors and mutators
(
> fixed number ) in the Form Bean.
>
>
> Can anybody pls help me with valuable suggesstion.
>
> Thanks in Advance
>
> Sankha
>
Hi Sankha,

You should use the tags iterate and equal in the logic taglib to display a
variable number of rows and columns. An example of using the iterate tag is
in registration.jsp of the struts example application.

One point is that it gets the collection to iterate over from the session
and not from the form so there is no accessors in the form bean exept from
the current values of the box.

Jean-Noël

Reply via email to