I have a form with a table which has a single row of three columns initially. I have a link which adds an extra row everytime it is clicked. Since I do not know how many might be added I used an arrayList. Here's how my JSP looks.
And this is how I am adding a row using Jquery
In my form, I wrote getter and setter for a member (of each iteration) apart from the getter and setter for the arrayList.
Now, the above code works fine if I try to add a single row and submit. But if I try to add more than one row at a time and submit, I get an IndexOutOfBoundsException. Can you please tell me what I am doing wrong and how can I fix it?