I'm having the following problem, I can load the data in my dataTable
but it gets very heavy, even the IDE of a locked one. How could I fix this problem? I heard about Lazy
but I did not understand how I can implement it.
Listing method:
public void listar() {
try {
if (listaBeneficiario == null) {
listaBeneficiario = new ArrayList<>();
}
System.err.println("Metodo Listar" + listaBeneficiario);
BeneficiarioDAO beneficiarioDAO = new BeneficiarioDAO();
listaBeneficiario = beneficiarioDAO.buscar();
} catch (Exception e) {
FacesUtil.adicionarMsgErro("Erro ao listar tarefas: "
+ e.getMessage());
}
}