Hi guyz,
Here is the solution for the issue we had
public class ListTextActionForm extends ActionForm {
public List customer;
public void setCustomer(List customer){
this.customer = customer;
}
public List getCustomer() {
return this.customer;
}
public void reset(ActionMapping mapping,HttpServletRequest request) {
int count=0;
String id ="";
if (null!=this.customer) {
System.out.println("List size1 :"+this.customer.size());
int numRows = this.customer.size();
while (null!=request.getParameter("customer["+ numRows +"].id"))
{
id = request.getParameter("customer["+numRows+"].id");
this.customer.add(new Customer(id,request.getParameter
("customer["+numRows+"].firstName"),request.getParameter
("customer["+numRows+"].lastName"),request.getParameter
("customer["+numRows+"].address"));
);
numRows++;
}
} else {
System.out.println("List is Empty");
}
}
}
Put the new added row in to the ActioForm collection to create bean for the
added row.
Thanks
Irfan