hi all
I have looked in numerous checkbox issues in this forum.
but I am unable to locate which highlights the simple issue that I am trying to figure out.
the value of the checkbox seems to always be true.
jsp code
initBind() method in controller.Code:<form:checkbox path="pollTO.securePoll" />
view sourceCode:pollTO.setSecurePoll(ServletRequestUtils.getBooleanParameter(request, "pollTO.securePoll", false));
[code]
<input id="pollTO.securePoll1" type="checkbox" value="true" name="pollTO.securePoll"/>
<input type="hidden" value="on" name="_pollTO.securePoll"/>
[code]
Now when the page renders then the checkbox for securePoll is unchecked but the value is true ?
any idea or maybe I need to go through the w3schools tutorial on input types :/
Thanks.


Reply With Quote