OptionGroup

Hi,
I have created an optionGroup (SetMultiSelect=true) and addValueChangeListener for it. Now when I call event.getProperty, it returns all selected values, but I just want to get only the value of selected item. for instance, if I select “a” it gives “a” and then I check “b” it gives “a, b”, I only want to get the new item which is “b”

Unfortunately, that is not possible. The value of the field is everything that is selected, which is a AND b in your case. The way you want it to work is not how ValueChangeListeners work. What you need is some kind of ItemSelectedListener or ItemClickListener, neither of which exist for this component.

Long story short, you need to implement this yourself if you need it.

You can always keep track of what the previous value was, and remove those selections from the new value.