RadioGroup with radio objects with same values

2010-01-06 Thread Kogel, Jonck-van-der
Hi,
I have a radiogroup that is built up dynamically, so I don't know ahead
of time what the choices are going to be. Now I noticed that if I have 3
radio buttons in a RadioGroup and let's say they all have the same value
(are all empty for example), the selected radio button will be the last
one in the group. Let me give an example:
 
RadioGroup
* value1 = foo
* value2 = foo
* value3 = foo
 
So all 3 radio choices have the value foo. The persisted value is also
foo, so all are valid so to speak and therefore the one that gets
selected is the 3d one. However, I would like it to be the first. Could
someone point me in the right direction how I should go about overriding
this behavior so it takes the first value it encounters instead of the
last?
 
Thanks, Jonck


Re: RadioGroup with radio objects with same values

2010-01-06 Thread Steve Swinsburg
Hi,

If its the first item in the list, set it to be selected one. A simple boolean 
could work here.

cheers,
Steve



On 07/01/2010, at 2:04 AM, Kogel, Jonck-van-der wrote:

 Hi,
 I have a radiogroup that is built up dynamically, so I don't know ahead
 of time what the choices are going to be. Now I noticed that if I have 3
 radio buttons in a RadioGroup and let's say they all have the same value
 (are all empty for example), the selected radio button will be the last
 one in the group. Let me give an example:
 
 RadioGroup
 * value1 = foo
 * value2 = foo
 * value3 = foo
 
 So all 3 radio choices have the value foo. The persisted value is also
 foo, so all are valid so to speak and therefore the one that gets
 selected is the 3d one. However, I would like it to be the first. Could
 someone point me in the right direction how I should go about overriding
 this behavior so it takes the first value it encounters instead of the
 last?
 
 Thanks, Jonck


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org