I am trying to implement dynamic rows paging.just imagine for a particular booking id lets say 22 records are there in the database.
per page i am displaying 10 records.if you see the HTML code as per sample its showing only 3 records .but in real it will display 10 records per page.in 3rd page it will display 2 records.don't bother abt paging.its working fine.
my problem is when user added or removed any rows and clicks next link and comes back to first page the values should be present. how the names should be given for the textboxes and checkboxes to read values in the form when user click next page?
when user clicks next or previous link i will read not only form values but also call fresh DB call against respective booking id(why because in between any other user can add or remove records for that booking id).after that i need to compare database values and the values that are added or removed in the page.below code shows that.
when user clicks next page in the
servlet the code will be like this.First it will read the values in the form and after that it will take the fresh values from DB for the booking id.
how to compare the requestList and databaseList?for example some rows are removed in the page and user clicks next link we will read the values and store it in requestList then i need to compare all values in requestList against databaseList?if that value doesn't exist then i remove that value from databaseList.finally i will display databaseList in the form.
does below code serve the purpose?;
in the servlet code i am using request.getParameterValues that means i have given same name for texboxes .is it ok;
this is table structure;ID is unique.Is the table structure is ok?
checkbox values will be unique.first checkbox id will be "houseCheck1" and value is 1;.second checkbox id will be "houseCheck2" and value is 2 and so on;