yeah its added and it renders and everything seems to work except its
not setting any data.
cheers,
steve
On 16/02/2009, at 5:21 PM, Igor Vaynberg wrote:
did you add emailRequests to the form or somewhere under?
-igor
On Mon, Feb 16, 2009 at 8:12 AM, Steve Swinsburg
<s.swinsb...@lancaster.ac.uk> wrote:
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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org