wood burning stoves*
The moose likes Struts and the fly likes checkboxes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "checkboxes" Watch "checkboxes" New topic
Author

checkboxes

Matt Sloan
Greenhorn

Joined: Aug 27, 2004
Posts: 26
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

Joined: Aug 27, 2004
Posts: 26
I have also tried:



all this does is pass the literal '${closedDay.careerScheduleChangeInd1}' to my form...
Matt Sloan
Greenhorn

Joined: Aug 27, 2004
Posts: 26
I've also tried:



as well as:


and still stuck
Matt Sloan
Greenhorn

Joined: Aug 27, 2004
Posts: 26
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

Joined: Feb 05, 2003
Posts: 4727

You need to null out the values of the checkboxes.

This isn't necessary though if your forms are request scope.


A good workman is known by his tools.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: checkboxes
 
Similar Threads
Struts 2 checkboxlist error - list key could not be resolved
how to map list of object from jsp to command object in spring
HttpURLConnection onSubmit problem.
Having some multidimensional array problem in JSP
ActionForm, ArrayList of VLOs , and populating them in the JSP