>@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") {
                @Override
                protected void onEvent(AjaxRequestTarget target) {
                        // there is no radio button for o1None so
choosing this
                        // deselects all radio buttons
                        setGroup1Option(new Integer(MyModel.o1None));
target.add(group1Choice1Radio);
                        target.add(group1Choice2Radio);         
                }
        });

Using this option I need to target.add() for each individual radio
button in the group I want to have deselected.

I tried using the RadioGroup object as the component added to the target
like:

target.add(option1Group); 

but got:

Last cause: Ajax render cannot be called on component that has
setRenderBodyOnly enabled. Component: [RadioGroup [Component id =
option1Group]]

Which makes sense because the RadioGroup component's tags disappear when
the markup is rendered.

Regards,
Chris

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

Reply via email to