I have simple flow, which shows the registration page to the user and requires the user to provide information about self, which includes gender.
the view state looks like below:
and in the appropriate view there is the following code fragment:
<view-state id="fillRegistrationForm" view="registrationForm.jsp" model="profile">
<binding property="email" required="true" />
<binding property="password" required="true" />
<binding property="confirmPassword" required="true" />
<binding property="gender" required="true" />
<transition on="register" to="displayResults"/>
what I can see - if none of these radio buttons is chosen , the binding operation is not performed at all for the gender field (I've checked with the debugger and was surprised), looks like the binding is being performed only for fields which were passed in the request - and since if none of radio buttons is selected - the appropriate parameter name does not exist in the request, so the mapping doesn't perform and thus required mark is simply does nothing - which is weird.
<p><form:label path="gender" cssErrorClass="errorLabel"> Gender <form:errors path="gender" cssClass="errorLabel" />
<form:radiobutton path="gender" value="MALE"/>MALE
<form:radiobutton path="gender" value="FEMALE"/>FEMALE
Is it a bug, or I am missing something?