Problem with <rich: combobox

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

I did it

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

rich: combobox does what it was designed for (input component with offers on the client side). To do this, for each selectItem, it uses iremValue as a label and ignores itemLabel.

If we want to use it to select values ​​based on selected labels (displayed by the component), we can improve it on the client side (like me) ...

In this article, I share my (working) approach:

: comboBox: ( ) RegExp http://community.jboss.org/docs/DOC-15534

JavaScript, , .

+4

Source: https://habr.com/ru/post/1741183/


All Articles