RE: Default selection in radio group?

2008-04-04 Thread Hoover, William
see http://cwiki.apache.org/confluence/display/WICKET/Using+RadioGroups

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2008 8:49 PM
To: users@wicket.apache.org
Subject: Default selection in radio group?


I created a RadioGroup with three radios attached. For some reason the form is 
being drawn with the last radio pre-selected, which I don't want. How can I 
pre-select a default radio and also how can I set the group to nothing selected?

Thanks,

Michael



Re: Default selection in radio group?

2008-04-04 Thread Cristi Manole
Hi,

What I did is use the same model for the group and for the radio item I want
selected.
For example:

add(radioGroup = new RadioGroup(group, new Model(selectthis))); //the
radio who has the same model will be selected

radioGroup.add(someradio1Radio = new Radio(someradio1radio, new
Model(selectthis)));
radioGroup.add(someradio2Radio = new Radio(someradio2radio, new
Model()));
radioGroup.add(someradio3Radio = new Radio(someradio3radio, new
Model()));

I hope this helps,
Cristi Manole

On Fri, Apr 4, 2008 at 3:01 PM, Hoover, William [EMAIL PROTECTED] wrote:

 see http://cwiki.apache.org/confluence/display/WICKET/Using+RadioGroups

 -Original Message-
 From: Michael Mehrle [mailto:[EMAIL PROTECTED]
 Sent: Thursday, April 03, 2008 8:49 PM
 To: users@wicket.apache.org
 Subject: Default selection in radio group?


 I created a RadioGroup with three radios attached. For some reason the
 form is being drawn with the last radio pre-selected, which I don't want.
 How can I pre-select a default radio and also how can I set the group to
 nothing selected?

 Thanks,

 Michael




RE: Default selection in radio group?

2008-04-04 Thread Michael Mehrle
Yes, that actually worked for me - thanks!! 

Michael

-Original Message-
From: Cristi Manole [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 04, 2008 5:33 AM
To: users@wicket.apache.org
Subject: Re: Default selection in radio group?

Hi,

What I did is use the same model for the group and for the radio item I
want
selected.
For example:

add(radioGroup = new RadioGroup(group, new Model(selectthis)));
//the
radio who has the same model will be selected

radioGroup.add(someradio1Radio = new Radio(someradio1radio, new
Model(selectthis)));
radioGroup.add(someradio2Radio = new Radio(someradio2radio, new
Model()));
radioGroup.add(someradio3Radio = new Radio(someradio3radio, new
Model()));

I hope this helps,
Cristi Manole

On Fri, Apr 4, 2008 at 3:01 PM, Hoover, William [EMAIL PROTECTED]
wrote:

 see
http://cwiki.apache.org/confluence/display/WICKET/Using+RadioGroups

 -Original Message-
 From: Michael Mehrle [mailto:[EMAIL PROTECTED]
 Sent: Thursday, April 03, 2008 8:49 PM
 To: users@wicket.apache.org
 Subject: Default selection in radio group?


 I created a RadioGroup with three radios attached. For some reason the
 form is being drawn with the last radio pre-selected, which I don't
want.
 How can I pre-select a default radio and also how can I set the group
to
 nothing selected?

 Thanks,

 Michael



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]