How can I update my dataTable
without restarting the application? The way I'm doing the table is updated after a F5 , but if I give F5 again, it gets outdated again.
For example: I have 3 positions, my query
only has the x
charge. When I edit a function x
to y
it keeps appearing in the table, if I give a F5 it disappears, but if I give F5 again it returns.
I'm trying to update the table as follows:
<f:event listener="#{controleAuditoriaLibBean.carregarPesquisa}" type="preRenderView"></f:event>
And my method that loads the search:
public void carregarPesquisa(){
try{
//Traz apenas se for "Liberação" e "Aguardando"
SolicitacoesDAO solicitacaoDAO = new SolicitacoesDAO();
list = solicitacaoDAO.listarPorUsuario("Liberacao", "Aguardando");
}catch(RuntimeException ex){
FacesUtil.adicionarMsgErro("Erro ao tentar listar as Auditorias");
}
}