7 Replies Latest reply on May 21, 2011 9:24 AM by Ilya Shaikovsky

    rich:autocomplete not working in a4j:outputPanel

    lvp Newbie

      Hi

      Am a newbie to RichFaces 4.

      Currently we are in the process of migrating from Rich 3.3.x to Rich 4.

       

      We are having a problem with migrating the rich:suggestionbox to rich:autocomplete

       

      The Rich 3.3.x code is as follows :

       

      <rich:column id="colRecipient" styleClass="recipient" title="ABC">    
          <ui:include src="rowEditSupport.jspx" />     

           <h:outputText id="outRecipient" value="Foo"
            rendered="#{xxx}"/>

           <h:inputText id="inRecipient" size="20"
             value="Foo"
             rendered="#{xxx}"
             styleClass="textbox" />
           
           <rich:suggestionbox id="recipientList"
            suggestionAction="#{fooBackBean.suggestRecipient}"
            var="recipient" for="inRecipient" 
            nothingLabel="No Value Found" fetchValue="#{recipient.recipientName}"
            selectValueClass="suggestion-select-value"
            styleClass="suggestion-style"
            popupClass="suggestion-popup" 
            selectedClass="selected-row"
            entryClass="entry-row"
            ignoreDupResponses="true"
            usingSuggestObjects="false"
            selfRendered="true"
            eventsQueue="foo"
            immediate="true"
            frequency="0"
            limitToList="true"
            minChars="3"  >
           
            <h:column>
               <h:outputText value="#{recipient.recipientName}"/>
            </h:column>
           
                
           <a4j:support actionListener="#{fooBackBean.setRecipientIdBySuggestionBox}"
            event="onselect" reRender="inRecipient" limitToList="true">
            <f:attribute name="selectedRecipient" value="#{recipient}"/>
           </a4j:support>
           
           </rich:suggestionbox>
              
         </rich:column>

       

      The new Rich 4 code is

       

      <rich:column id="colRecipient" styleClass="recipient">

          <a4j:outputPanel id="panelRecipientCol"> 

           <h:outputText id="outRecipient" value="Foo"

            rendered="#{xxx}" />

          

           <rich:autocomplete mode="cachedAjax" minChars="2"

                   id="sgstRecipient"

                   layout="table"

                   value="Foo"

                   rendered="#{xxx}"

                     autocompleteMethod="#{fooBackBean.suggestRecipient}"

                     autocompleteList="#{fooBackBean.recipients}"

                     var="recipient"

                     fetchValue="#{recipient.recipientName}">

            <rich:column>

             <h:outputText value="#{recipient.recipientName}" />

            </rich:column

            </rich:autocomplete>

          

          </a4j:outputPanel>

         </rich:column>

       

      but the autocomplete is not working .also how to replace the actionListener ?