Skip to content
Advertisement

How can i can get Strings from Enum after using toString()

I am creating a list from which the user can select from using Vaadin8. I want to get the values from the Enum but the string values with spaces not the Element Names.

JavaScript

Here is the list created to select from the Enum elements:

JavaScript

And here are 3 lines I tried that did not work:

JavaScript

Advertisement

Answer

You can add a value property:

JavaScript

Usage:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement