3 Replies Latest reply on Apr 17, 2012 4:18 AM by navurinv

    rich:autocomplete triggers unwanted update of other fields

    amakuhin

      Hello everybody.

       

      I use rich:autocomplete field as you see below:

                               <a4j:region>
                                  <h:panelGrid columns="3" style="width: 100%;">
                                      <h:outputText value="ServerId" styleClass="input"/>
                                      <rich:autocomplete mode="lazyClient" 
                                                         autocompleteList="#{AddServiceWizard.serverIdList}"
                                                         minChars="2"
                                                         selectFirst="false"
                                                         autofill="false" 
                                                         required="true"
                                                         showButton="true"
                                                         value="#{AddServiceWizard.curServerNumber}"/>
                                      <a4j:commandButton action="#{AddServiceWizard.serverByServerNumber}"
                                                         value="Найти сервер" execute="@region" 
                                                         render="addServiceResult, @form"/>
                                  </h:panelGrid>
                              </a4j:region>
      
      

       

      When user enters text into the field, this event triggers update of other parts of page which are not connected with this field absolutely.

       

      How can I make this field update itself only without triggering any other updates?

        • 1. Re: rich:autocomplete triggers unwanted update of other fields
          navurinv

          Alexey Makukhin wrote:

           

          Hello everybody.

           

          I use rich:autocomplete field as you see below:

          
                                   <a4j:region>
                                      <h:panelGrid columns="3" style="width: 100%;">
                                          <h:outputText value="ServerId" styleClass="input"/>
                                          <rich:autocomplete mode="lazyClient" 
                                                             autocompleteList="#{AddServiceWizard.serverIdList}"
                                                             minChars="2"
                                                             selectFirst="false"
                                                             autofill="false" 
                                                             required="true"
                                                             showButton="true"
                                                             value="#{AddServiceWizard.curServerNumber}"/>
                                          <a4j:commandButton action="#{AddServiceWizard.serverByServerNumber}"
                                                             value="Найти сервер" execute="@region" 
                                                             render="addServiceResult, @form"/>
                                      </h:panelGrid>
                                  </a4j:region>
          
          

           

          When user enters text into the field, this event triggers update of other parts of page which are not connected with this field absolutely.

           

          How can I make this field update itself only without triggering any other updates?

          remove @form at

          <a4j:commandButton action="#{AddServiceWizard.serverByServerNumber}"
                                                             value="Найти сервер" execute="@region"
                                                             render="addServiceResult, @form"/>
          • 2. Re: rich:autocomplete triggers unwanted update of other fields
            amakuhin

            @form is about commandButton, but I do not even click click it.

            I only enter text into autocomplete field when these events triggers.

            • 3. Re: rich:autocomplete triggers unwanted update of other fields
              navurinv

              Alexey Makukhin wrote:

               

              @form is about commandButton, but I do not even click click it.

              I only enter text into autocomplete field when these events triggers.

              follow this link.it will help you sure

              https://community.jboss.org/wiki/RichfacesAutocompleteComponentbehavior