2 Replies Latest reply on Apr 3, 2008 8:04 AM by ramprasadhtv

    Rich Combo box issues

      I am using Rich Combo box in my page and I request for help

      1) I want to use combo as a suggestion box as well. So this means that whenever i type something in the combo, i need to fetch the updated list from the server side based on the entered character and display the filtered list in the combo. By clicking the arrow icon on the combo i get to see all possible values in the combo whiich is fine.
      This is what i tried.
      <rich:comboBox selectFirstOnUpdate="false" defaultLabel="EnterSomeValue" id="buyerCombo"
      directInputSuggestions="true" suggestionValues="#{searchPageBean.buyerGroupAutoComplete}" listHeight="50">
      <a:ajaxSupport event="onkeyup" disableDefault="true" actionListener="#{searchPageBean.getSuggestionsForBuyerGroup}">
      </a:ajaxSupport>
      </rich:comboBox>

      When i tried in IE, the keyup event fires and i am able to update the list in the server side but unable to rerender or show the list of the combo

      Can you please help?

      2) I want to use Model objects in the collection and not String so that i can dsplay the attributes i want in the combo. Is this possible?

      Thanks in advance

        • 1. Re: Rich Combo box issues
          abelevich

          Hi,

          1. you can't reRender just list of comboBox, and if you'll try to reRender combo - it will collapsed because of reinitialization of combo component

          2. in general you can use your modal objects ... , but combo use
          selectItems values or Collection/Array objects from the suggestionValues also for displaying suggestions in the drop/down so if you have appropriate String converter for this purpose you can.

          • 2. Re: Rich Combo box issues

            Thank you for reply

            Regarding 1) So if i need to have a suggestion action in a combo box with a wild card like search then can you please let me how will I show the combo values when user enter a character in the combo box. Do i need to invoke any java script?