I just want to know how to use a Boolean in a Spring mvc form.
I try with this code:
My jsp:
<form:radiobutton path="dateInterval" value="false" cssClass="radio"/>
<form:radiobutton path="dateInterval" value="true" cssClass="radio"/>
The property on the pojo:
private Boolean dateInterval = false;
But my dateInterval property is always null!
Just to clarify things: In my opinion it also works with Boolean Object. I have a form using Spring 3 and this setup is running perfect (using true/false/null Values as an Option):
Form JSP:
Model Object (named Tour):
Therefore I don't unterstand why I should have changed my Property to simple boolean. This works in my case.
My help came from this post in the Spring Forum.
I have them working on my form like this:
and in my model object the someProperty looks like this:
That works fine. I haven't tried it with 'Boolean'. Maybe just try it with boolean and see if it helps.