2
I’m in the struggle trying to popular a selectOneMenu with data from a Enum, but when I gave up and put the static data with f:selectItem I realized that still the field is empty.
Even with value filled with #{clienteBean.teste} the result is the same, where test is an attribute of type String with your getters and setters.
<p:selectOneMenu id="console" value="" style="width:125px">
<f:selectItem itemLabel="Select One" itemValue="" />
<f:selectItem itemLabel="Xbox One" itemValue="Xbox One" />
<f:selectItem itemLabel="PS4" itemValue="PS4" />
<f:selectItem itemLabel="Wii U" itemValue="Wii U" />
</p:selectOneMenu>
Obs: the above example is the same as the showcase.
You can post the Enum code and its method, if you have, which returns all Enum values?
– Rafael