• Post Reply Bookmark Topic Watch Topic
  • New Topic

checkboxes  RSS feed

 
Matt Sloan
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having problems capturing when the user checks a check box on my form.

here is a piece of my jsp:


here is my ActionForm:


my checkbox is unchecked on initial load, but when the user clicks it, my form still sees it as 'off'. How do I reset the new value to my form?
 
Matt Sloan
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have also tried:



all this does is pass the literal '${closedDay.careerScheduleChangeInd1}' to my form...
 
Matt Sloan
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've also tried:



as well as:


and still stuck
 
Matt Sloan
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok making some progress...

But now, another question. I know I need to override the reset method in my ActionForm class becuase of the checkboxes, but what exactly is it supposed to do?
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to null out the values of the checkboxes.

This isn't necessary though if your forms are request scope.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!