4 Replies Latest reply on Nov 15, 2013 1:53 AM by alixey

    RF4.3.4: Autocomplete and queue

    alixey

      Hi all, i use Richfaces 4.3.4.Final. This my example:

      <rich:autocomplete mode="ajax" autocompleteMethod="#{autocomplete.autocompleteLegals}"
                         minChars="0" var="s" fetchValue="#{s.realName}" id="legal-suggestion"
                         autofill="false"
                         onselectitem="autocompleteChangeLegal(event.target)" style="display: inline;"
                         layout="table" value="#{autocomplete.legalName}"
                         required="true">
                         <h:column>
                            <h:outputText style="display:none;" value="#{s.id}"/>
                            <h:outputText style="display:none;" value="#{s.realName}"/>
                         </h:column>
                         <h:column>
                            <h:outputText value="#{s.name}" escape="false"/>
                         </h:column>
                         <a4j:queue requestDelay="500" ignoreDupResponses="true" />
      </rich:autocomplete>
      
      

      In example above - a4j:queue IGNORING! But in example below:

      <rich:autocomplete mode="ajax" autocompleteMethod="#{autocomplete.autocompleteLegals}"
                         minChars="0" var="s" fetchValue="#{s.realName}" id="legal-suggestion"
                         autofill="false"
                         onselectitem="autocompleteChangeLegal(event.target)" style="display: inline;"
                         layout="table" value="#{autocomplete.legalName}"
                         required="true">
                         <a4j:queue requestDelay="500" ignoreDupResponses="true" />
                         <h:column>
                            <h:outputText style="display:none;" value="#{s.id}"/>
                            <h:outputText style="display:none;" value="#{s.realName}"/>
                         </h:column>
                         <h:column>
                            <h:outputText value="#{s.name}" escape="false"/>
                         </h:column>
      </rich:autocomplete>
      
      

      a4j:queue works successfully.

      In documentation here Component Reference i not found any information about this. Is it bug?

        • 1. Re: RF4.3.4: Autocomplete and queue
          bleathem

          To be sure I am interpreting this correctly, you have observed that the a4j:queue tag will only work with the rich:autocomplete tag when the queue is the first child of the autocomplete tag?

          • 2. Re: RF4.3.4: Autocomplete and queue
            alixey

            From one side you is right, but from another i not sure. When we put a4j:queue inside another element, a4j:queue must to know its parent, so, a4j:queue must add its functionality to parent independently from position(first child or second or another).

            If you still not agree with me, i'll mark discussion as answered(and i'll try to remember that a4j:queue must be first child).

            • 3. Re: RF4.3.4: Autocomplete and queue
              alixey

              Brian, look at this:

              <h:selectOneMenu value="#{agentMenuMassList.menuProfile}">
                  <s:selectItems noSelectionLabel="#{messages['pages.noSelect']}" value="#{agentMenuMassList.menuProfiles}" var="m" label="#{m.name}"/>
                  <s:convertEntity/>
                  <a4j:ajax event="change" render="editPanel,menuPanel" listener="#{agentMenuMassList.change}"/>
                  <a4j:queue requestDelay="5000" />
              </h:selectOneMenu>
              
              
              

              a4j:queue - works sucessfully(waits 5 seconds before ajax request), and a4j:queue not a first child(a4j:queue - last child).

              So, i think, that a4j:queue for autocomplete its a bug.

              • 4. Re: RF4.3.4: Autocomplete and queue
                alixey