4 Replies Latest reply on Mar 26, 2013 11:43 PM by holger.lierse

    a4j:ajax listener attribute doesn't work for rich:autocomplete

    ainanmis

      Can you help, please?           

      My code is below.       

       

                                            <rich:autocomplete mode="cachedAjax" minChars="1" id="taniKodu"

                                                            value="#{provizyonBean.detay.detayType.konsultasyon.tani.kod}" 

                                                                   autocompleteMethod="#{provizyonBean.detay.autocompleteTaniKod}">

                                                                   <f:attribute name="typeAttr" value="kod"></f:attribute>

                                                                   <f:attribute name="renderId" value="taniAdi"></f:attribute>

                                                                   <a4j:ajax  event="blur" execute="@this" render="anaform:taniAdi"

                                                                       listener="# {provizyonBean.detay.autocompleteListener}" />

                                             </rich:autocomplete>

      autocompleteListener does't work when rich:autocomplete blur event fired.

        • 1. a4j:ajax listener attribute doesn't work for rich:autocomplete
          iabughosh

          i've noticed this too, a4j:ajax doesn't work with autocomplete, so i'm doing this walkaround :

          <a4j:jsFunction name="blurFunction" execute="autoComplete" render="outputText" actionListener="#{user.nameListener}"/>

                              <rich:autocomplete id="autoComplete"

             ...

                                                                         minChars="1"

                                                                         mode="cachedAjax"

                                                                         onblur="blurFunction()"/>

           

          regards.

          1 of 1 people found this helpful
          • 2. a4j:ajax listener attribute doesn't work for rich:autocomplete
            ilya_shaikovsky
            1 of 1 people found this helpful
            • 3. a4j:ajax listener attribute doesn't work for rich:autocomplete
              ainanmis

              Thanks Ibrahim, thanks Ilya. I used Ibrahim's way to make it. It worked.

              • 4. Re: a4j:ajax listener attribute doesn't work for rich:autocomplete

                Hello,

                 

                Has this issue been resolved in richfaces 4.2.3.Final? Searching the internet I could find a whole lot of related issues but it's not clear to me whether it has been fixed.

                 

                How would I go about adding a parameter?

                 

                THis is what I've currently got:

                <rich:autocomplete id="suggestionEntity" mode="cachedAjax" autocompleteMethod="#{userTree.suggest}"

                          var="entity" fetchValue="#{entity.name}" minChars="3" autoFill="false" selectFirst="false" layout="table">

                          <rich:column label="Name" style="width:250px">

                                    <h:outputText value="#{entity.name}" />

                          </rich:column>

                          <rich:column label="Level" style="width:50px">

                                    <h:outputText value="#{entity.level}" />

                          </rich:column>

                           <a4j:ajax event="selectitem" listener="#{userTree.search(entity)}" render="user-tree-panel, table-panel-content"/>

                </rich:autocomplete>

                 

                Thanks,

                 

                Holger