5 Replies Latest reply on May 31, 2007 10:55 AM by Ilya Shaikovsky

    SuggestionBox causing Conversation Ended message

    James Hays Novice

      When using <rich:suggestionbox I seem to be getting a lot of "The conversation ended, timed out or was processing another request" If I type slow and let the results come back, it appears to work fine. I run into issues with users who can type more than a few words per minute...

      Here is my relevant html

      <h:panelGroup>
       <h:panelGroup id="AddProductButton" styleClass="addProduct">
       <a4j:support action="#{viewProfileRecord.addNewProduct(profileGate)}"
       ignoreDupResponses="false" event="onclick"
       eventsQueue="addNewProductQueue"
       onsubmit="toggleStatusBar('Adding Product')"
       oncomplete="toggleStatusBar('Complete', 2000)"
       limitToList="true"
       reRender="ProductList,NewProductFieldGroup,SubmitChangesButton"/>
       </h:panelGroup>
       <h:panelGroup id="NewProductFieldGroup">
       <h:inputText id="NewProductField" value="#{viewProfileRecord.newProductName}" size="14" onkeypress="return checkFormSubmit(event)" styleClass="text"/>
       <rich:suggestionbox for="NewProductField"
       ignoreDupResponses="true" bypassUpdates="true"
       eventsQueue="addNewProductQueue"
       suggestionAction="#{viewProfileRecord.autoCompleteAvailableProducts}"
       var="p"
       width="200" height="200">
      
       <h:column>
       <h:outputText value="#{p[0]}" title="#{p[1]}"/>
       </h:column>
       </rich:suggestionbox>
       </h:panelGroup>
       </h:panelGroup>
      


      There is an <h:form surrounding this segment higher in the page.

      My Suggestion Action is just a query
       public List autoCompleteAvailableProducts(Object suggest)
       {
       log.info("Automagically finding available products...");
       List values = em.createQuery("Select p.name, p.description from ProductTemplate p " +
       "WHERE p.baseProfileGate.baseProfile = :baseProfile " +
       " AND upper(p.name) like upper(:value)").setParameter("baseProfile", profileRecord.getBaseProfile()).setParameter("value", suggest + "%").getResultList();
       log.info("Products Found: " + values.size());
       return values;
       }
      


      In this example, I've added the eventsQueue, ignoreDupResponses, bypassUpdates, etc, and it has helped some, but I still run into issues.

      Any thoughts here? Is anybody else running into this?

      James