• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

rich:comboBox problem !

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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}" />
</h:selectOneMenu>

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

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

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

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

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

Could anyone help me?

Thank you,

David
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David,

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

Thanks,
Tamas
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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, JBoss.org.
 
Tamas Malatinszki
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, here is the solution, it seems rich:comboBox is working in a different way.

Tamas
reply
    Bookmark Topic Watch Topic
  • New Topic