You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "david.li" <lx...@hotmail.com> on 2013/04/05 11:23:54 UTC
how to set radio
hello. I use the wicket RadioGroup in my project.the code like this:
final RadioGroup group = new RadioGroup("group", new Model());
Radio monthRadio = new Radio("month", new Model());
monthRadio.add(new AjaxEventBehavior("onchange") {
@Override
protected void onEvent(AjaxRequestTarget target) {
System.err.println("=======monthRadio=========");
}
});
Radio weekRadio = new Radio("week", new Model());
weekRadio.add(new AjaxEventBehavior("onchange") {
@Override
protected void onEvent(AjaxRequestTarget target) {
System.err.println("=======weekRadio=========");
}
});
Radio dayRadio = new Radio("day", new Model());
dayRadio.add(new AjaxEventBehavior("onchange") {
@Override
protected void onEvent(AjaxRequestTarget target) {
System.err.println("=======dayRadio=========");
}
});
group.add(monthRadio, weekRadio, dayRadio);
form.add(group);
in IE Browser,when i click a radio,there was no radio checked.
I want to know how to resolve it.
and if i need to set a radio default check,how can i do?
thanks
-----
david
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-set-radio-tp4657770.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: how to set radio
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
You have to use
org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior on the
RadioChoice component.
On Fri, Apr 5, 2013 at 12:23 PM, david.li <lx...@hotmail.com> wrote:
> hello. I use the wicket RadioGroup in my project.the code like this:
> final RadioGroup group = new RadioGroup("group", new
> Model());
> Radio monthRadio = new Radio("month", new Model());
> monthRadio.add(new AjaxEventBehavior("onchange") {
> @Override
> protected void onEvent(AjaxRequestTarget target) {
>
> System.err.println("=======monthRadio=========");
> }
> });
>
> Radio weekRadio = new Radio("week", new Model());
> weekRadio.add(new AjaxEventBehavior("onchange") {
> @Override
> protected void onEvent(AjaxRequestTarget target) {
>
>
> System.err.println("=======weekRadio=========");
> }
> });
>
> Radio dayRadio = new Radio("day", new Model());
> dayRadio.add(new AjaxEventBehavior("onchange") {
> @Override
> protected void onEvent(AjaxRequestTarget target) {
>
>
> System.err.println("=======dayRadio=========");
> }
> });
> group.add(monthRadio, weekRadio, dayRadio);
> form.add(group);
>
> in IE Browser,when i click a radio,there was no radio checked.
> I want to know how to resolve it.
> and if i need to set a radio default check,how can i do?
> thanks
>
>
>
> -----
> david
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/how-to-set-radio-tp4657770.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>