Using just the empl_name field as an example, your ActionForm should be set
up like this:
private String[] empl_name = {};
public void setEmpl_name(String empl_name[]) {
this.empl_name= empl_name;
}
public String getEmpl_name(int i) {
return this.empl_name[i];
}
public String[] getEmpl_name() {
return this.empl_name;
}
Hope that helps.
-----Original Message-----
From: Balaraman, Vinod Kumar (Cognizant)
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 25, 2002 7:59 AM
To: [EMAIL PROTECTED]
Subject: nesting
Hi,
I would be happy if get a solution for the question described below?
As per my understanding FormBean is mirror structure of the jsp page, since
it maps every field defined in it to the field in the jsp.
My Jsp page has set of rows, each row containing one employee information.
For ex: each row has emp_name and emp_id, emp_dateofBirth etc.
How do i define the fields in my FormBeanClass in this case.
There are two possible ways:
1) Define fields like emp_name and emp_id, emp_dateofBirth etc with
get and set methods - In this case how all the employee information gets
updated? Do I need to use any collection or Enumeration classes here? If so
how?
or
2) To Define all the fields in the Formbean like
emp_name_1 emp_id_1
emp_dateofBirth_1
emp_name_2 emp_id_2
emp_dateofBirth_2
emp_name_3 emp_id_3
emp_dateofBirth_3
.................
think this is not the good way........
Regards,
Vinod
Ext: 4485