I have a DataTable
with some data when I select a row of the table and click on the end of process this line is saved in my bank with the status Finalizado
and Cargo
of the logged in user, however that line only add from my table after several F5
or else I go out and enter the table again. I'm loading the data into the table through this method:
@ManagedBean(name = "controleAuditoriaBean")
@ViewScoped
public class ControleAuditoriaAuditorBean {
private List<SolicitacoesBD> list;
private List<SolicitacoesBD> listEnviados;
@PostConstruct
public void carregarPesquisa() {
try {
SolicitacoesDAO solicitacaoDAO = new SolicitacoesDAO();
//Se o cargo for "Liberacao" e o Status for "finalizado" faz a pesquisa.
list = solicitacaoDAO.listarPorUsuario("Liberacao", "Finalizado");
System.out.println("Caminho: "+solicitacoesBD.getCaminhoArquivo());
} catch (RuntimeException ex) {
}
}
}
I'm using ViewScoped
in this Bean.
And this is how my dataTable starts:
<p:dataTable id="tblAudAud" emptyMessage="Nenhum registro encontrado"
var="controleAuditoria" value="#{controleAuditoriaBean.list}"
filteredValue="#{controleAuditoriaBean.listFiltrada}" rows="10"
paginator="true" style="margin-top: 5px;"
rowKey="#{controleAuditoria.codigoBeneficiario}">
Can it be the system that is heavy? Why not update?