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
Hi,
On Thu, May 31, 2012 at 10:04 AM, Thomas Götz t...@decoded.de 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
@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, should deselect
@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(onclick)
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:
span wicket:id=radioGroup1
div wicket:id=radioGroup1Div
On Thu, May 31, 2012 at 11:48 AM, Chris Colman
chr...@stepaheadsoftware.com 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
span wicket:id=radioGroup1
div wicket:id=radioGroup1Div
input id=choice1 name=option1 type=radio
value=01 wicket:id=choice1
input id=choice2 name=option1 type=radio
value=02 wicket:id=choice2
/div
/span
div inside span is invalid HTML. I know