2 Replies Latest reply on May 1, 2009 12:36 AM by msantana

    Combobox shows numbers

    msantana

      Hi everyone!
      Maybe there is somebody  who knows why is happening this.
      I´ve got this code:


      <s:decorate id="categoriaField" template="layout/edit.xhtml">
           <ui:define name="label">Categoria</ui:define>
                <rich:comboBox value="#{productoHome.instance.categoria}"
                     defaultLabel="Seleccione..." 
                     required="true"
                     directInputSuggestions="true" onchange="save.enable">   
                        <s:selectItems 
                            var="categoria"
                            value="#{categoriaServiceBean.findAll()}" 
                            label="#{categoria.descripcion}" 
                            itemValue="#{categoria}" />
                          <s:convertEntity/>
                   </rich:comboBox>
      
       </s:decorate>


      And the problem is that the combobox is showing me categories but it shows me numbers instead of the description.


      Anyone knows why??
      Thanx in advice!!

        • 1. Re: Combobox shows numbers
          radu

          Because unfortunately the guys from Richfaces says that These components works as designed. It is a input component, and not a select component (as it should if you ask me).


          You will find tones of rejected Jira issues about this subject. One example is https://jira.jboss.org/jira/browse/RF-3559


          My opinion: the component is completely useless as it is.


          Something like this should be a priority for Richfaces, Oracle ADF and Trinidad components has the concept of List of values or LOV which is relay helpful in enterprise applications (think that you can not have a drop down with 10000 items to select from... and you want to let the user filter the results).


          You can see the demo on Oracle site here http://www.oracle.com/technology/products/jdev/viewlets/11/index.html on ADF Business Components - List Of Values


          Here you can find another richfaces jira link with a feature request for this component: https://jira.jboss.org/jira/browse/RF-3565


          Status is of course, REJECTED.


          I myself thinking to move away from richfaces because the lack of components like this.

          • 2. Re: Combobox shows numbers
            msantana

            Oh GOD! Thank you for that information!
            But... which component must i use instead of it. Exists something similar to it?