i am using icefaces select on menu to select a user from list of users and i want to repeat the selectItem for each user here's what i tried:
<ice:selectOneMenu id="users">
<ui:repeat value="#{user.getUserList()}" var="user">
<f:selectItem itemLabel="#{user.name}" itemValue="#{user.id}"/>
</ui:repeat>
</ice:selectOneMenu>
UserBean:
@Component("user")
@Scope("view")
Public class UserBean{
Public List<User> getUserList() throws Exception {
return userService.getAllUsers();
}
}
NOTE: UserBean doesn't contains the properties id,name they exist in User entity. please advise, thanks.