dcsimg
Help in dynamic text fields
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Saveta_rampersad
Posted On:   Tuesday, May 31, 2005 02:36 PM

Hi, I have a JSP where I want to create 18 data entry sections and ecah of these scetions are identical. I can use 18 different objects for each section but that would be an ugly solution. My form is as follow private BT bt = null; /** * Constructor to initialize default values */ public BtForm() { this.bt = new BT(true); for (int i = 0; i < 18; i++) bt.getBtList().add(new BT1(true)); } //end constructor My JSP is as follow AccountNumber: My action is as follow Form for   More>>

Hi, I have a JSP where I want to create 18 data entry sections and ecah of these scetions are identical. I can use 18 different objects for each section but that would be an ugly solution.

My form is as follow

private BT bt = null;

/**
* Constructor to initialize default values
*/
public BtForm() {
this.bt = new BT(true);
for (int i = 0; i < 18; i++)
bt.getBtList().add(new BT1(true));

} //end constructor


My JSP is as follow


			



AccountNumber:




My action is as follow

Form form = (Form)Form; BT bt = form.getBt(); ArrayList al = bt.getBtList(); for (int i = 0; i < al.size(); i++) { BT1 bt1 = (BT1)al.get(i); System.out.println("ACCOUNT NUMBER " + bt1.getNumber()); }




can create the 18 fileds dynamically on the JSP but when I submit the form after entering data into it it always show "null" in action.
Could some one please tell me why I am getting the null values after submiting the form. Thanks a much    <<Less
About | Sitemap | Contact