3 Replies Latest reply on Mar 12, 2010 8:24 AM by nbelaevski

    rich:comboBox and SelectItems



      I am new to reichfaces and I am trying to create a combobox the way I know it from other JSF Implementations.

      So I what I do is creating a method on my BackingBean that returns List<SelectItem> in order to

      set the Label and Value in the ComboBox.


      The Method looks like this:


                List<SelectItem> lResultList = new ArrayList<SelectItem>();
                List<EntityDomainValue> lValues = mDomainValueService.getDomainValues(TermsOfPaymentDomainValue.class, true);
                for(EntityDomainValue lValue: lValues){
                     SelectItem lItem = new SelectItem(lValue.getDomain(),lValue.getValue());
                return lResultList;

      And the JSP Snippet like this:

      <rich:comboBox value="" >
           <f:selectItems value="#{customerEditViewController.termsOfPaymentList}"></f:selectItems>


      But what the ComboBox prints out is not the Label of the SeletcItem, but the result of the toString() from the Value Object. What am I getting wrong?


      And another question would also be, where I can find the DataModel Descriptions for the RichFaces Components, and where to use them. Such as ExtendetDataTableModel. I have been searching for such Information but found nothing. All you have in the Demo is the XML. This is not very much in my eyes.


      Thank you for your Help,