Getting 'unchecked' value from Struts checkbox
Posted on 2004-08-23
I know that checkbox is only supposed to return a value IF checked but I'm getting a checked value returned all the time. I'm using a DynaActionForm on a form that does a search i.e. you fill in 2 boxes at the top, click Search and the results are dsplayed below i.e. I can't just re-display the form nicely reset to default values.
When I uncheck the checkbox I expect there to be no reference to it in the dynaactionfom, yet there it is with a value of On! Which means I cannot check for it correctly in the Action class.
How can I stop this please?