I have a html table that has 4 columns. This table is built from the database and can have any number of rows. For the first column of every row there is a check box. What I need to do is when this form gets posted to my servlet i need to loop though and get the parameters for each row of the table and update the corresponding row in my database. Below is the form i am using. I am not sure the best way to do this in the servlet and i am looking for some direction. Also does each of the rows components have to have a different name?
If you name all the fields the same, you can get an array of the values with request.getParameterValues(), but how would tell which belongs to which row? Order is not guaranteed.
Is the vCode value unique to each row? If so, you could incorporate it into the names used on that row.
If any one is having the same problem this was my resolution: Should anyone see that it can be improved in any way please post a response all my fields were named the same with the vendorcode appended on the end to diferentiate the rows.
Form:
Servlet:
[ October 26, 2008: Message edited by: John Schretz ]