Hi,
I have problems displaying a ListBox inside my application. If I try to display it inside the Vaadin skeleton starter it works just fine…
final var listBox = new ListBox<String>();
ArrayList<String> items = new ArrayList<>();
items.add("Elem1");
items.add("Elem2");
items.add("Elem3");
listBox.setItems(items);
I have noticed that the CSS looks different in my application when comparing with the vaadin skeleton application.
Here is the CSS when correctly displayed:
As you can see in the second CSS the “role=listbox” is missing , also for each item “role=option” is missing.
Do you have any idea what can cause the CSS of ListBox to be changed so that it is not displayed correctly?
What Vaadin version are you using? productionMode parameter has been deprecated for a long time; the flag is automatically set by build-frontend.
However, recent Vaadin version perform a cleanup after production build, so that a subsequence run of the application from the IDE would result in a DEV mode execution.
If on older version, running mvn clean should allow you to run the application in DEV mode again.
I am using Vaadin 24.4.11
but forceProductionBuild is set
<configuration>
<!-- To always force an optimized production bundle build set this configuration to 'true' -->
<!-- To possibly use the pre-compiled production bundle remove or set to 'false' -->
<forceProductionBuild>false</forceProductionBuild>
<!-- To have reproducible build by running 'npm ci' -->
<ciBuild>true</ciBuild>
</configuration>
Strange thing: I have Java and Groovy classes mixed up in my project. Somehow, for the views created in Groovy, the problem remains also after mvn vaadin:dance. Any ideas?