Hi all, I can't figure out how the RadioGroup component works in Wicket
My use case is this. I have a bunch of parameters which I need a true/ false answer for. So each group of choices (true or false) will map to a boolean parameter in my PropertyModel.
What is wrong with this code:CompoundPropertyModel preferencesModel = new CompoundPropertyModel(profilePreferences);
Form form = new Form("form", preferencesModel);
RadioGroup emailRequests = new RadioGroup("emailRequestsEnabledGroup",
new PropertyModel(preferencesModel, "emailRequestsEnabled"));
emailRequests.add(new Radio("requestsOn", new Model(true)));
emailRequests.add(new Radio("requestsOff", new Model(false)));
and markup:
<tr wicket:id="emailRequestsEnabledGroup">
<td class="item"><input type="radio" wicket:id="requestsOn" /></td>
<td class="item"><input type="radio" wicket:id="requestsOff" /></td>
</tr>
In my onSubmit I just get the modelObject and save it as I do with
other forms. I was hoping that the boolean parameter in that object
would be set to true/false depending on the radio button. It's not
being set at all though.
An example of what I want to do is illustrated by the Facebook > Settings > Notifications page where it has a bunch of radiobuttons with On/Off
cheers, Steve
smime.p7s
Description: S/MIME cryptographic signature
