Re: ChangeListener for the RadioGroup Component

2012-06-15 Thread Martin Grigorov
Hi, #onSelectionChanged() works only if you override #wantOnSelectionChanged() to return true. Otherwise you can also use AjaxFormChoiceComponentUpdatingBehavior() and update the label with Ajax. On Fri, Jun 15, 2012 at 11:01 AM, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Hi all, I

Re: ChangeListener for the RadioGroup Component

2012-06-15 Thread Dmitriy Neretin
Thanks! Can you describe how can I use the AjaxFormChoiceComponentUpdatingBehavior() with the label? 2012/6/15 Martin Grigorov mgrigo...@apache.org Hi, #onSelectionChanged() works only if you override #wantOnSelectionChanged() to return true. Otherwise you can also use

Re: ChangeListener for the RadioGroup Component

2012-06-15 Thread Martin Grigorov
Something like: final Label label = ... RadioChoiceString sites = new RadioChoiceString(site, SITES); sites.add(new AjaxFormChoiceComponentUpdatingBehavior() { @Override protected void onUpdate(AjaxRequestTarget

Re: ChangeListener for the RadioGroup Component

2012-06-15 Thread Dmitriy Neretin
Thanks! It was really helpful! But I am only to 99% ready :) There is a little problem in your code example: if I make so: label.setDefaultModelObject(sites.getModelObject()); I get a compiler error: Cannot refer to a non-final variable sites inside an inner class... Is there any workaround for

Re: ChangeListener for the RadioGroup Component

2012-06-15 Thread Martin Grigorov
either make 'sites' final or use Wicket events ( http://www.wicket-library.com/wicket-examples/events/ ) On Fri, Jun 15, 2012 at 12:42 PM, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Thanks! It was really helpful! But I am only to 99% ready :) There is a little problem in your code

Re: ChangeListener for the RadioGroup Component

2012-06-15 Thread Dmitriy Neretin
Perfect! Thank you! 2012/6/15 Martin Grigorov mgrigo...@apache.org either make 'sites' final or use Wicket events ( http://www.wicket-library.com/wicket-examples/events/ ) On Fri, Jun 15, 2012 at 12:42 PM, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Thanks! It was really