I had the same question some time back and I used this :

http://struts.apache.org/userGuide/building_controller.html

refer section "4.3.2 Map-backed ActionForms"

Regards,
Abhinav

-----Original Message-----
From: Ciaran Hanley [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 23, 2005 3:02 PM
To: 'Struts User Mailing List'
Subject: How to create form rows dynamically

Can somebody help me or propose a solution to the following please.



I wish to create a form dynamically. Depending on the business logic
there
could be 0 to N rows in the form. I tried to use a form with an array of
strings and use the indexed="true" setting in the html:text boxes but as
I
was not following any example I ran into problems and didn't have any
guide
as to where I was going wrong.



I also need to iterate over a bean containing information which
corresponds
to the form as the form boxes are being displayed.



Say if there is 3 rows required, it should ok like the following.



Payment     Old Amnt    New Amnt          Date

1           35          [45]              [12/12/04]

2           35          [45]              [12/01/05]

3           35          [45]              [12/02/05]



Where [] represents a html:text box.



I am also unsure as to how to access these values when I get to the
form/action classes.



Any help would be much appreciated!




**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not to copy, disclose, or distribute this e-mail or its contents to any other 
person and any such actions are unlawful. This e-mail may contain viruses. 
Infosys has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this e-mail. 
You should carry out your own virus checks before opening the e-mail or 
attachment. Infosys reserves the right to monitor and review the content of all 
messages sent to or from this e-mail address. Messages sent to or from this 
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

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

Reply via email to