The Vaadin “Entity list” example for [Radio Button]
(https://vaadin.com/components/vaadin-radio-button/java-examples) shows a radio button group with nothing selected. I’m using version 14.1.18 and running the exact same code (as shown above) will not create a radio button group that has nothing selected. By default, the first item in the list gets selected automatically. Either the implementation has changed and Vaadin never updated the documentation or that’s not the code that was used to create that example.
I finally got it to work, but it was a laborious process:
Step 1: delete the sex radio button group and recompile
Step 2. rename the variable and recompile
Step 3. rename the enum and recompile
Step 4. change the enum values and recompile
Step 5. change the implementation of the getName method (simplify) and recompile
I have no idea why I was getting different behavior from the sex radio button group for the first 10 times I tried to get it working. I would send a zip, but I don’t want to roll back all of the changes I’ve made since then.
I finally thought of ‘mvn clean’ after about 5 tries. I have no idea what the issue could have been. The Vaadin example worked as soon as I tried it. The code that I couldn’t get to work was, for all practical purposes, the same code but with my user defined types.