optiongroup spanning multiple components

Hi all,

I’m trying to build the following component:


http://www.freeimagehosting.net/elbij

Basically, I want the user to be able to input the languages he knows, and to choose one of them as his mother tongue.
Every row is a custom field that contains two comboboxes.
Adding and removing rows is no problem, but the mother tongue radio button is. Ideally I’d have a single optiongroup which “spans” multiple row components, and which is grown or shrinked whenever a row is added or removed.

What I do now is create an option group with a single option in every row component and in a ValueChangeListener I uncheck all others. It works, but I’m basically rebuilding a radio button by hand which feels like a hack to me :slight_smile:

Is this a common problem, and are there common solutions for this? Any thoughts?

This is in Vaadin 7 (beta 9)

Thanks,
Ben

Hi,

take a look at the
FlexibleOptionGroup
add-on. With it you should be able to layout the options however you want and they still remain linked to each other.

Ok thanks, I’ll check it out.