title: How to get the text value from the input in p:autocomplete if selection was not made
body: <p>I want to use the p:autocomplete element for searching persons in my application. If the the user selects an item from the autocomplete list then some action is called. But when he doesn't select any, there is button where he can search by the entered String and a table of persons will be shown. </p>
  
  <p>So far I have an itemSelect event listener, which handles the first part but I identify the persons by Long IDs so the value of the p:autocomplete field is bound to a managedBean Long property. When I don't make any selection a hit the button to search I don't have the string value.</p>
  
  <p>Is it possible to somehow get the String value from the inputField in the backing bean? The one option that I am thinking of is to have a hidden element next to the autocomplete and set the value of the hidden element with the value of the autocomplete when clicking the search button. However, I have all this in a custom component so I don't really know what are the IDs of the components and therefore cannot write the Javascript function (without some dirty unsafe hacking).</p>