File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes rich:comboBox problem ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "rich:comboBox problem !" Watch "rich:comboBox problem !" New topic

rich:comboBox problem !

David Salaete

Joined: Aug 27, 2008
Posts: 19

I�m trying to load a richfaces comboBox, but it only shows the IDs of the
selectItems, not the descriptions. Whith a h:selectOneMenu it works fine.

I return a list of SelectItems. The code is as follows:

<!-- it works -->
<h:selectOneMenu id="comboGrupo" value="#{userMB.grupoActivo}"<
< f:selectItems value="#{userMB.elementos}" />

<!-- but it isn�t work -->

<rich:comboBox id="richCombo">
<f:selectItems value="#{userMB.elementos}" />

The way I�m loading the elements in the managed bean for both richcombo and selectOneMenu is as follows:

ArrayList<SelectItem> col= new ArrayList();
SelectItem si = new SelectItem(String.valueOf(myObject.getId()),myObject.getName());

But I only get a comboBox whith IDs in the case of the rich combo... not any description...

Could anyone help me?

Thank you,


There are 10 types of people: Those who understand binary code and those who don�t.
Tamas Malatinszki

Joined: Apr 17, 2008
Posts: 5
Hi David,

I have the same issue with rich:comboBox, did You find any solution?

Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
You might have more luck if you ask RichFaces specific questions at a forum devoted to RichFaces. There's of course one at its homepage,
Tamas Malatinszki

Joined: Apr 17, 2008
Posts: 5
Ok, here is the solution, it seems rich:comboBox is working in a different way.

I agree. Here's the link:
subject: rich:comboBox problem !
It's not a secret anymore!