• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Maintain checked and unchecked in checkbox in pagination

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
all
I want to maintain the state of checkboxes across pages.
What happens is when i check one checkbox and then go to say 2nd page then check one checkbox there and when i return to previous page the checked box is again unchecked.
Means the status of the checkbox is not maintained.If it is maintained then it should show checked.

I am using jsps and display tag in jsp for pagination.
Any kind of help would be greatly appreciated.
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Red text on tan is completely unreadable.
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

rahulj rjagtap wrote:hi,
all
I want to maintain the state of checkboxes across pages.
What happens is when i check one checkbox and then go to say 2nd page then check one checkbox there and when i return to previous page the checked box is again unchecked.
Means the status of the checkbox is not maintained.If it is maintained then it should show checked.

I am using jsps and display tag in jsp for pagination.
Any kind of help would be greatly appreciated.



i think you should be capturing the values entered by the users somewhere in the session? your checkbox code should contain a conditional way of making it checked or unchecked like below.

<input type="checkbox" checked="<<read the previous value form session>>" />
 
rahulj rjagtap
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you John Pradeep.v for your reply.
You are saying is right. I tried to implement what you had said. But i am getting difficulty in it because i am new to java.

Could you please explain me giving some example of code.
Thanks for your help in advance.
 
Bear Bibeault
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suspect you'd get more responses if people could actually read your post. I've removed the red coloring from the text for you. In the future, please use color only sparingly and for emphasis. Making your posts hard to read is not the best strategy for getting people to help you.
 
We can fix it! We just need some baling wire, some WD-40, a bit of duct tape and this tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic