title: How to process p:inputText change event
body: <p>I am using p:inputText and my requirement is to fire a javascript function, that would update the backing bean searchField</p>
  
  <pre><code>&lt;p:inputText required="true" placeholder="#{cc.attrs.searchTip}" value="#{cc.attrs.queryProperty}" /&gt;
  
  &lt;p:remoteCommand name="resetSearch" actionListener="#{searchBean.resetSearch}" process="@this" /&gt;
  </code></pre>
  
  <p>And here is my javascript function. I used firebug to find the id of inputText element and thats page:j_idt18:searchForm:j_idt20_input. Id is correct for sure</p>
  
  <pre><code>$("#page:j_idt18:searchForm:j_idt20_input").change(function() { 
      alert("Its here");
      if(!this.value) {
         resetSearch();
         } 
  });
  </code></pre>
  
  <p>It looks fine to me, but when I edit my search field, by adding or deleting then alert is not fired. Main requirement is to call backing bean, when user uses backspace button to make the search field empty.</p>
  
  <p>I checked id of inputText element and wrote a javascript function</p>
  
  <p>My question is, how can I write javascript/jquery function, who constantly monitor any changes in the searchfield(p:inputText).</p>