title: Capturing primefaces <p:autoComplete> change event (detect emptying)
body: <p>i got a question concerning an Primefaces autocomplete. Rigth now i am updating a field with the value of a property of the selected value in the autocomplete, like this: </p>
  
  <p>This is in my xhtml:</p>
  
  <pre><code>&lt;p:autoComplete
      value="#{trFitoModel.selectedProducte}"
      id="nomComercial"
      completeMethod="#{trFitoBacking.completeProducte}"
      var="producte" itemLabel="#{producte.nom}"
      itemValue="#{producte}" converter="#{ProducteFitoConverter}"
      forceSelection="true"
      onkeyup="this.value = this.value.toUpperCase();"&gt;
      &lt;p:ajax event="itemSelect"
          listener="#{trFitoBacking.handleSelect}"
          update="text" global="false" /&gt;
      &lt;f:validator validatorId="qea.validators.EmptyFieldValidator" /&gt;
      &lt;f:attribute name="validationTitle" value=" NomComercial " /&gt;
  &lt;/p:autoComplete&gt;
  &lt;/p:column&gt;
  &lt;p:column&gt;
      &lt;h:outputLabel&gt;#{msgI18N.trFito}&lt;/h:outputLabel&gt;
      &lt;h:outputText id="text"
          value="#{traFitoBacking.resgistre}"&gt;
      &lt;/h:outputText&gt;
  &lt;/p:column&gt;    
  </code></pre>
  
  <p>And this is my Backing Bean:</p>
  
  <pre><code> public void handleSelect(SelectEvent event) {
      ProducteFitosanitari p=(ProducteFitosanitari)event.getObject();
      setResgistre(Integer.toString(p.getNumRegistre()));
  }
  </code></pre>
  
  <p>This works, but now I'm trying to update the outputText with id "text" with an empty String when the value of the autocomplete is empty.</p>
  
  <p>How can I capture the event triggered when <code>p:autoComplete</code> is emptied?</p>