tags:

views:

26

answers:

1

I'm running into a small issue with RadioGroup. My RadioGroup has possible values, true and false. The Radio types I have in my radiogroup use a Model that stores true or false.

On an ajax onchange event I want to do some handling, and to do so I need to know the selected radio in my radiogroup and another identical radiogroup. The problem is getValue() only returns the initial value from my Pojo. Whenver I click on a radio button to change the selected Radio getValue() still returns the initial value.

When I save my changes, my Pojo gets the correct value. I am finding this bizarre and have spent hours trying to figure our what I'm missing.

A: 

You need to make sure that the Value (state) from the Checkbox gets pushed to the model. have a look at AjaxFormComponentUpdatingBehavior. See

http://www.jroller.com/karthikg/entry/wicket_and_ajax

they explain a bit about this.

disclaimer: i don't have access to the sources where i have done such a thing and write this only with what i remember from it

bert