private Label errorMessage;
EnumEditorViewImpl(final List<String> enumValues, final List<String> enumDescriptions) {
// Sets up a SuggestOracle that, when the textbox has focus, displays the
// valid enum values and their descriptions.
MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
List<Suggestion> suggestions = Lists.newArrayList();
for (int i = 0; i < enumValues.size(); i++) {
suggestions.add(new EnumSuggestion(
enumValues.get(i), enumDescriptions == null ? "" : enumDescriptions.get(i)));
}
oracle.setDefaultSuggestions(suggestions);
this.suggestBox = new SuggestBox(oracle);
suggestBox.getTextBox().addFocusHandler(new FocusHandler() {
@Override
public void onFocus(FocusEvent event) {
suggestBox.showSuggestionList();