This content has been marked as final.
Show 4 replies
-
1. Re: Objects in rich:comboBox
ilya_shaikovsky Feb 19, 2008 7:09 AM (in response to andersun)you could try to use your object but you have to define converter in this case
-
2. Re: Objects in rich:comboBox
andersun Feb 19, 2008 11:46 AM (in response to andersun)I have following:
Car car = getCar(); ... items.add(new SelectItem(car.getId(), car.getName())); ...
and comboBox views list of Ids, but not car names, and in my Converter i should have Id to get car object -
3. Re: Objects in rich:comboBox
aaexoun Mar 12, 2008 11:10 AM (in response to andersun)Hey Andersun,
i faced the same problem when migrating from normal <h:selectOneMenu> to <rich:comboBox>. Somehow it swaps value and label, so insert the names first and it should be all fineCar car = getCar(); ... items.add(new SelectItem(car.getName(), car.getId())); ...
-
4. Re: Objects in rich:comboBox
ilya_shaikovsky Mar 17, 2008 9:14 AM (in response to andersun)ComboBox - simplified client-side suggestion based component which designed to works only for string values out-of-the-box.
ComboBox gets values from String collection defined in suggestionValues binding or the values could be defined using f:select* tags with value defined. In the second case - coboBox gets only value both for displaying and store result.