RE: Is there a quick way to deselect all radio buttons in a group via an AJAX event?

2012-05-31 Thread Chris Colman
>> >>         >>                > value="01" wicket:id="choice1"> >>                > value="02" wicket:id="choice2"> >> >> >>         >> > > inside is invalid HTML. I know that one of those is not >rendered at all because it is attached to the RadioGroup but ... >can't you do radioGroup.setRend

Re: Is there a quick way to deselect all radio buttons in a group via an AJAX event?

2012-05-31 Thread Martin Grigorov
On Thu, May 31, 2012 at 11:48 AM, Chris Colman wrote: > Doh! That approach fails when I target.add a second radio button. > > I needed to create a new MarkupContainer to wrap the group in and then I > target.add() that div and deselection of all items works well. > > So it looks like this: > > >

RE: Is there a quick way to deselect all radio buttons in a group via an AJAX event?

2012-05-31 Thread Chris Colman
Doh! That approach fails when I target.add a second radio button. I needed to create a new MarkupContainer to wrap the group in and then I target.add() that div and deselection of all items works well. So it looks like this:

RE: Is there a quick way to deselect all radio buttons in a group via an AJAX event?

2012-05-31 Thread Chris Colman
>@Chris: Can't you reset the RadioGroup's model so that none of the >Radios models match and re-render the whole group ? Bingo! I got it working. I wasn't adding the radio button to the target in the event handler. This is what works: group2Choice1Radio.add(new AjaxEventBehavior("onclic

RE: Is there a quick way to deselect all radio buttons in a group via an AJAX event?

2012-05-31 Thread Chris Colman
>@Chris: Can't you reset the RadioGroup's model so that none of the >Radios models match and re-render the whole group ? That's what I tried first but it didn't work for some reason. > >> >>   -Tom >> >> >> >> On 31.05.2012 at 08:20 Chris Colman wrote: >> >>> We have a button that, when clicked

Re: Is there a quick way to deselect all radio buttons in a group via an AJAX event?

2012-05-31 Thread Martin Grigorov
Hi, On Thu, May 31, 2012 at 10:04 AM, Thomas Götz wrote: > What about using Javascript? e.g. jQuery: > > $('input:radio').attr('checked', false); > > or > > $('input[name=myRadio]:radio').attr('checked', false); > I guess he will need to update the server state as well. @Chris: Can't you reset

Re: Is there a quick way to deselect all radio buttons in a group via an AJAX event?

2012-05-31 Thread Thomas Götz
What about using Javascript? e.g. jQuery: $('input:radio').attr('checked', false); or $('input[name=myRadio]:radio').attr('checked', false); -Tom On 31.05.2012 at 08:20 Chris Colman wrote: > We have a button that, when clicked, should deselect ALL radio buttons in a > separate radio gr