1 Reply Latest reply on May 4, 2011 2:53 AM by Daniel Lechner

    Rendering of combobox

    pankaj jain Newbie



      I have a table company which is having values for company_name , I want to render it into <rich:combobox>


      I tried a lot , but failed ,


      I have created arrayList which stores list of objects of company(company_id and company_name)  and its setter and getter but I am not getting how to bind it with <rich:combobox>.

      <rich:combobox value="?">

      <f:selectedItem value="?" />



      Please suggest.

        • 1. Rendering of combobox
          Daniel Lechner Novice

          I'm sorry, but I do not fully understand your requirements. But anyway - I try to make a suggestion


          <rich:combobox value="#{bean.selectedCompanyValue}" >

            <f:selectItems value="#{bean.companyValuesSelectItems}" />



          So you have to make a method in your bean which provides a List of SelectItems. The selected value will be stored in the attribute selectedCompanyValue.

          If you're using Seam, you could try to use s:selectItems instead of f:selectItems.