7 Replies Latest reply on May 22, 2009 6:40 PM by German Escobar

    rich:suggestionbox problem: don't show autocomplete the seco

    Ignacio Borraz Newbie

      Hello,

      I have a piece of code that consist in a normal inputText and a suggestionbox for autocomplete capability.

      In my application I would do this:
      - write the initial characters of a contact
      - Suggestionbox shows the suggested values in a list
      - Select one of the suggested contacts
      - Push a button (ajax:commandButton) to pass the value from inputText to a SelectManyListBox.
      - write another initial characters of a contact for repeat the process and add more than one value to the SelectManyListBox.

      In this last step is where I find problems. When I introduce for second time (after works all correctly the first time) the initial characters, the suggestionbox don't appear and I can't add more than one contact to the listbox.

      I have tried with "ajaxSingle = true", with "bypassUpdates = true", with "eventQueue = 50", with "frequency = 0", with "immediate = true", and with "usingSuggestedObjects = true", but non of these solves my problem.

      This is my piece of code:

      <table>
      <tr>
      <td><label><h:outputText value="#{msgapp.fincas_contactos2}"/>  </label></td>
       <td><h:inputText id="nombreApellidoContacto" value="#{fincaBean.nombreApellidoContacto}" size="25" styleClass="editable" />
       <rich:suggestionbox height="100" id="suggBox" for="nombreApellidoContacto" var="result" ajaxSingle="true" eventsQueue="50" usingSuggestObjects="true"
       suggestionAction="#{fincaBean.contactNombreAutoComplete}" minChars="4" nothingLabel="No hay resultados" width="175" reRender="suggBox" bypassUpdates="true" frequency="0" immediate="true">
       <h:column>
       <h:outputText value="#{result}" />
       </h:column>
       </rich:suggestionbox></td>
       <td><a4j:commandButton process="nombreApellidoContacto" reRender="contactsBorrar,nombreApellidoContacto" action="#{fincaBean.asociarContacto}"
       value="#{msgapp.gen_seleccionar}" ajaxSingle="true"/></td>
       </tr>
      


      Thank you for your help,

      Ignacio.