I am working in JSP and I am displaying records from
the database in the table in the front end.
I am also displaying checkbox for each record.
On clicking the checkbox and the submit
button, I am performing an update in the database.
I have a next hyperlink on the page clicking on which
the next 10 records are displayed.
But the problem is if the user selects a checkbox and then clicks
on the next hyperlink and checks another record in the next page
and then clicks the submit button, then only the selected record which is
present on the screen is updated in the database.
The record which is checked in the previous page is not updated
in the database.
I am using request.getParameterValues("CheckBoxName") to get
the values of selectd checkboxes but the checkboxes which are
checked in the previous page are not updated.
Don't know whether to use session tracking ?
Any suggestions ?
Thanks & Regards
this behaviour is very much obvious. when u click the next hyperlink a new page is loaded and only the checkboxes in the current page will be included as part of the request which goes to the servlet on click of the submit button. hope this helps. bye.
Probably u can use the session object. When user clicks on NEXT, put all the checked item in the session object. Try it.