tags:

views:

369

answers:

1

why the rich: comboBox uses the value to display in the listing and not the label, as I do to show the description and select the id.

I did so

 <rich:comboBox width="300">
    <t:selectItems value="#{compromissoHome.buscar}" var="teste" itemValue="#{teste.testeId}" itemLabel="#{teste.teste1}"/>
</rich:comboBox>
+1  A: 

Hi William...

rich:combobox does what it was designed to (an input text component with client-side suggestions). To do so, for each selectItem, it uses iremValue as label and ignores itemLabel.

If we want to use it for selecting of values based on selected labels (rendered by the component), we can enhance it on the client-side (as I did)...

In this article I share my (working) approach:

Enhanced rich:comboBox: Values (not only Text) and RegExp Suggestions http://community.jboss.org/docs/DOC-15534

If you have no problem in working with JavaScript, please test it and let me know what you think.

God bless you.

Best regards, Luis Tama

luiggitama