yasser zairi [http://community.jboss.org/people/yasser_z] created the discussion
"population a selectOneMenu Dynamically" To view the discussion, visit: http://community.jboss.org/message/617590#617590 -------------------------------------------------------------- Hi, i want to populate a selectOneMenu Dynamically from my Bean, i used a map(id, value) but it populate my selectOneMenu with the ids not the values , here is the selectOneMenu: _________________________________________________________________ <h:selectOneMenu id="select_cat"> <f:selectItem itemLabel="--categorie"/> <f:selectItems value="#{valeursMBean.categories}"/> </h:selectOneMenu> __________________________________________________________________ here is the code of my Bean: __________________________________________________________________ private transient ValeurRefService valeurefService; private Map<String,Integer> categories = new HashMap<String,Integer>(); @PostConstruct public void init(){ valeurefList = valeurefService.find(); categories.clear(); for (ValeurRef m : valeurefList) { categories.put(m.getIdValeurRef(),m.getCategorie()); } } -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/617590#617590] Start a new discussion in JBoss Tools at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
