I have list of String like this in managed bean :
List<String> roleList = Arrays.asList("MANAGER", "ADMIN", "USER");
I want to use it in a selectOneMenu like this :
<f:selectItems itemLabel="#{userMB.roleList}" ....}"/>
</h:selectOneMenu>
both value and lable Iwant to be the same
what I must do ?
<f:selectItems value="#{userMB.roleList}" var="role"
itemLabel="#{role}" itemValue="#{role}" />