I have a problem with the autoComplete component of PrimeFaces. The value parameter is not being passed to my bean.
private String filtroClientes;
public List<String> listarFiltroDeClientes()
{
List<String> lista = new ArrayList<String>();
List<Cliente> clientesFiltrados = Clientes.buscarPorPartesDoNome(filtroClientes);
for(int i = 0; i < clientesFiltrados.size(); i++)
{
lista.add(clientesFiltrados.get(i).getNomeCliente());
}
return lista;
}
public String getFiltroClientes() {
return filtroClientes;
}
public void setFiltroClientes(String filtroClientes) {
this.filtroClientes = filtroClientes;
}
<p:autoComplete id="acCliente" value="#{projetosBean.filtroClientes}"
completeMethod="#{projetosBean.listarFiltroDeClientes()}"/>
When giving a print in the "Customers filter" it shows the null value, ie what was typed in the autocomplete input is not passing to the bean. Otherwise the component is working normally, I already tried to pass any string to filter the clients and the component worked.
Anyone who can help from now on thanks. Thanks!