title: Unable to disable <p:commandButton> via ajax
body: <p>I want to disable the button in case there is no value in the input text something like this:</p>
  
  <pre><code>&lt;p:autoComplete  id="ac" value="#{bean.selectedNet}"
      completeMethod="#{bean.complete}"
      minQueryLength="0" size="3"&gt;
      &lt;p:ajax event="itemSelect" update="genButton" listener="#{bean.handleNetChange}"/&gt;
      &lt;p:ajax process="@this" update="genButton" /&gt;
  &lt;/p:autoComplete&gt; 
  
  &lt;p:selectManyCheckbox id="en" layout="pageDirection" value="#{bean.selectedEntity}"&gt; 
      &lt;f:selectItems value="#{bean.entityList}"/&gt;
      &lt;p:ajax update="genButton" listener="#{bean.handleNetChange}"/&gt;
  &lt;/p:selectManyCheckbox&gt;
  
  &lt;p:commandButton id="genButton" value="Generate Files"
      widgetVar="startButton1"
      disabled="#{bean.disableButton}"
      actionListener="#{bean.generate}"
      onclick="PrimeFaces.monitorDownload(showStatus, hideStatus)"
      ajax="false"&gt;
      &lt;p:fileDownload value="#{bean.streamedContent}"/&gt;
  &lt;/p:commandButton&gt;
  </code></pre>
  
  <p>Methods:</p>
  
  <pre><code>public void handleNetChange() {
      if (!StringUtils.isBlank(selectedNet) &amp;&amp; !selectedEntity.isEmpty()) {
          disableButton = false;
      } else {
          disableButton = true;
      }
  }
  
  public List&lt;String&gt; complete(String query) {
      List&lt;String&gt; results = new ArrayList&lt;String&gt;();
      if (StringUtils.isBlank(query)) {
          selectedNet = query;
          disableButton = true;
      } else {
          ....
      }
      return results;
  }
  </code></pre>
  
  <p>While the itemSelect event is working perfectly the second one is not. I can see the call to the complete method in the bean but the button is not updated</p>
  
  <p>Any advise?</p>