I am creating a web application, where you have to read a list of objects / entities from a DB and populate it in a JSF <h:selectOneMenu>
. I am unable to code this. Can someone show me how to do it?
I know how to get a List<User>
from the DB. What I need to know is, how to populate this list in a <h:selectOneMenu>
.
<h:selectOneMenu value="#{bean.name}">
...?
</h:selectOneMenu>