<h:form>
<p:autoComplete id="autoCompleteID" value="#{myBean.item}"
completeMethod="#{myBean.completeMethod}">
</p:autoComplete>
<h:commandButton action="#{myBean.searchRelatedItems}"/>
</h:form>
Here my scenario is like Google search, I can see related Items in suggestion and also redirect another page based on text typed in p:autoComplete
text field. Its works fine by clicking the button, but I also want to achieve the same by hitting ENTER
in p:autoComplete
text field.