1 Reply Latest reply on Sep 11, 2007 4:42 AM by ilya_shaikovsky

    Suggestion Box with multiple value

    roykachouh

      Hey guys/gals,

      Is there a way I can have an ajax suggestion box that will return two values for two different input boxes. For example, lets say we have a suggestion box that will suggest a banks name. The query will use what the user entered in to return possible suggestions, but can it also bind an idea for example.

      Lets say the user enters "citi"

      The suggestions come back as
      citibank
      citigroup
      citimortgage
      etc,etc,etc

      When a user chooses citibank, how can i also assign the underlying ID of citybank to perhaps a hidden field??

      Thanks

      h:inputText size="10" id="legalName" value="#{API.inputEntity.owningEntityGuidStr}" styleClass="input1">
      
       </h:inputText>
       <rich:suggestionbox
      
       for="legalName"
       suggestionAction="#{LEGAL_ENTITY_SUGGESTOR_AJAX.gatherSuggestions}" var="result" fetchValue="#{result.entityLegalName}"
       requestDelay="500"
       width="500">
       <h:column>
       <h:outputText value="#{result.entityLegalName}" />
       </h:column>
       <f:param name="parentToAssign" value="#{result.entityLegalName}"/>
       </rich:suggestionbox>
       <h:column>
      


        • 1. Re: Suggestion Box with multiple value
          ilya_shaikovsky

          When suggestion popup is called you can return anything you need. If you will use ajaxSingle="false" on your suggestionBox - the whole form instead of the only one field - will be submitted. And in your autocomplete action - you'll be able to get any additional fields values and return some list you need to client.