How to create addlistener in OptionGroup ?

Hi Friends,

I am working on vaadin and i have Created OptionGroup for selection.
I have added addlistener for any click event.
But It is not working for me.

Please Help me.

Thanks in Advance

Hi,

maybe this helps:

optionGroup.setImmediate(true);

-Henri

Thanks for reply henri…

But still it is not working…

Look into below sample code : -

OptionGroup optiongroup = new OptionGroup(“Please Select the option : -”);
optiongroup.setImmediate(true);
optiongroup.addListener(Button.ClickEvent.class,this,“optiongrouplistener”);

public void optiongrouplistener(Button.ClickEvent event){
	System.out.println("inside the optiongrouplistener");

////// I am unable to call listener /////////

}

As far as I know
OptionGroup
doesn’t handle clickevent(clicklisteners). You might want to handle
ValueChangeEvent
instead.