Make an OptionGroup (radio buttons) from an enum in Vaadin 7?
问题 I have a Java enum with a getter for the desired display text. How can I use this to populate an OptionGroup in Vaadin 7? 回答1: Here are three ways to do this in Vaadin 7: A class I built, EnumBackedOptionGroup . A subclass of OptionGroup in Vaadin 7. Roll-your-own the short sweet way. Roll-your-own the more flexible way. Subclass of OptionGroup Here is the source code of a new subclass of OptionGroup I wrote. package com.basilbourque; import com.vaadin.ui.OptionGroup; import java.util.Arrays;