title: Reset value to null in primefaces autocomplete event
body: <p>I have an autocomplete event that fires correctly once a value is selected. I want another event to fire once I erase the value in the textbox and reset the value to null. I was thinking of using the onChange attribute but I was having issues so I reverted back to my original code.</p>
  
  <pre class="lang-xhtml prettyprint-override"><code>&lt;p:autoComplete id="deviceAuto" dropdown="true" scrollHeight="250" 
                  value="#{summaryReportController.device.nickname}" 
                  forceSelection="true" 
                  completeMethod="#{summaryReportController.deviceComplete}"&gt;
      &lt;p:ajax event="itemSelect" 
          listener="#{summaryReportController.handleDeviceSelect}" 
          update="printThis" /&gt;  
  &lt;/p:autoComplete&gt; 
  </code></pre>
  
  <pre class="lang-java prettyprint-override"><code>public void handleDeviceSelect(SelectEvent event) {
      String deviceSelect = event.getComponent().getId();
      if (deviceSelect.equalsIgnoreCase("deviceAuto")) {
          Device selectedDevice = deviceMgr.getDevicebyNickname(device.getNickname());
          setDevice(selectedDevice);
      }
      updateInterface();
  }
  </code></pre>