Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

maintain checkbox status in pagination.

 
maha laxmi
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to implement paging;results will come from DB;IN EVERY PAGE i should display 10 records;each record has checkbox;in the first page i checked 5 records and in the next page i checked another 5 records and i navigate between first page and second page the checked and unchecked results should be populated.how to maintain checkbox checked and unchecked status in pagination.
[ December 08, 2006: Message edited by: Bear Bibeault ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would need to submit an HTTP form to move back and forth between the pages. The form post would contain the names of the checkboxes that were checked.
Before drawing the rows to the screen, you would need to match them up against the posted checkbox values to find out which ones need to be checked.

To draw an HTML checkbox with a check in it add the "checked" attribute:
 
maha laxmi
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to maintain checked and unchecked results during pagination
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
You would need to submit an HTTP form to move back and forth between the pages. The form post would contain the names of the checkboxes that were checked.
Before drawing the rows to the screen, you would need to match them up against the posted checkbox values to find out which ones need to be checked.

To draw an HTML checkbox with a check in it add the "checked" attribute:
 
maha laxmi
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i asked you should i maintain in session??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic