Struts 1.x: unchecked checkbox is checked automatically after validation

C

cteb

Hi group!

The usual Struts problem with checkboxes is that they are turned off
unless you specify a default value in reset():
http://struts.apache.org/1.1/faqs/newbie.html

However, my problem is that an unchecked checkbox is checked after a
submit operation. Why could that be happening? I don't know how to debug
this as it seems to be happening deep in the entrails of Struts. Again -
I leave the checkbox unchecked, and still it turns up as checked
somewhere after the validate process (I have my own validate method,
which never touches the corresponding Boolean property).

Thanks for any assistance you can give me with this!
 
G

GArlington

Hi group!

The usual Struts problem with checkboxes is that they are turned off
unless you specify a default value in reset():http://struts.apache.org/1.1/faqs/newbie.html

However, my problem is that an unchecked checkbox is checked after a
submit operation. Why could that be happening? I don't know how to debug
this as it seems to be happening deep in the entrails of Struts. Again -
I leave the checkbox unchecked, and still it turns up as checked
somewhere after the validate process (I have my own validate method,
which never touches the corresponding Boolean property).

Thanks for any assistance you can give me with this!

Log the value of this (or all) checkbox(es) before and AFTER your
validation (as a first and last line in your code)...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top