The Artima Developer Community
Sponsored Link

Java Answers Forum
Query on tracking the selected checkbox values across the paging

3 replies on 1 page. Most recent reply: Oct 26, 2005 2:16 AM by Venkatesh Wararao

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Venkatesh Wararao

Posts: 3
Nickname: honeywell1
Registered: Oct, 2005

Query on tracking the selected checkbox values across the paging Posted: Oct 26, 2005 12:03 AM
Reply to this message Reply
Advertisement
Hi,
Can any one help me with the JSP code to keep track of the selected checkboxes across different pages in a pagination which displays 10 records at a time and everytime when we click on next the records are fetched from Database..So when i select some checkboxes in first page and proceed to second page and select few more checkboxes ..Now chen i come back the selected values will be lost...So,Please help me regarding this......


Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Query on tracking the selected checkbox values across the paging Posted: Oct 26, 2005 12:44 AM
Reply to this message Reply
I don't quite get the question, if you're using a database
why not simply send your results directly to the database
after each submit.

That way your database fields will have:

checked_q1 = true (or false)
checked_q2 = true (or false)

Give this an entry index, that way if you want to refer
back just search the index you gave (having been stored
in a global variable or made accessible via getters and
setters), and read from the database.

As I said I may have a misconstrued view of what you are
trying to achieve here so feel free to correct me.

Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: Query on tracking the selected checkbox values across the paging Posted: Oct 26, 2005 1:22 AM
Reply to this message Reply
I think he wants to use some sort of save button which saves all pages at the same time.

Answer is: You need a list of boolean field and recordset id.

After loading a page, check if there is an entry for every displayed recordset in this list.
If not, add the entry.

Before clearing the page (when you change to another page) save all displayed checkboxes in the list.

Venkatesh Wararao

Posts: 3
Nickname: honeywell1
Registered: Oct, 2005

Re: Query on tracking the selected checkbox values across the paging Posted: Oct 26, 2005 2:16 AM
Reply to this message Reply
Hi regarding my query on tracking the selected checkbox values across the paging


To be clear for you i am giving an example...

In Yahoomailbox select checkbox for some mails displayed..Now go to next page by clicking on the next link provided to check more mails.....Now come back to the first page you can see all the selections made by you in the first page gets unselected but take the gmail you can see the selected once even after comming back from other pages...

Flat View: This topic has 3 replies on 1 page
Topic: Help!! Can I send command to Modem? Previous Topic   Next Topic Topic: Jpanel and Jframe

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use