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

html:checkbox

 
rudresh kumar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI All,

I have few checkboxes in my jsp, intially it is unchecked and after the user checks , the values are there and stored in database too, it is working fine no issues

But when a user checks the check box and again unchecks it, now after submitting the page the user can see that the check box is still checked, which he had unchecked earlier.

This is built on struts and i have formbean where in i put all the form values (get/set methods) and this is in session scope.
I had tried various options like reset method and others suggested in net, but could not find a solution,

I can add a hidden field and handle it in javascript, but that solution is difficult now as i need to create get/set for all fields and in front end addtions and that too for some 50 checkboxes doing this solution, i believe is not the correct way.

I request some one can help me out on this

Thanks
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My questions would be about what code is being executed when the user submits the page and how the page is redisplayed. I suggest that you post your action mappings, action class, form class and relevant jsp code.

- Brent
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic