Well I'm using Primefaces I have a field p: autoComplete to look for Employees, I would like that when I typed a name and no results were found it would display the message "No employee found, click here to register "(display the message I already do using the autocomplete emptyMessage attribute), and when I clicked on here a dialog was displayed. I tried using AJAX but without success I believe I will have to use JavasCript or jQuery, if you can help me thank you right away !! Here is the autocomplete code:
<p:autoComplete value="#{bean.funcionario}"
completeMethod="#{bean.completarFuncionario}" var="funcionario"
itemLabel="#{funcionario.nome}" itemValue="#{funcionario}"
emptyMessage="Nenhum funcionário encontrado click aqui para cadastrar!" />