I have a problem scrolling through a list.
My for
looks like this:
for (int i = 0; i < listaCaixaAbertos().size(); i++) {
listaCaixaAbertos().get(i).setFechado(Boolean.TRUE);
salvar(listaCaixaAbertos().get(i));
}
My list looks like this:
public List<LancamentoCaixa> listaCaixaAbertos() {
Query q = em.createQuery("FROM LancamentoCaixa As a WHERE a.fechado = false");
return q.getResultList();
}
Every time I scroll through the list I want to set false
to variable fechado
.
But it does not change all the data in this list, to change all I have to click several times depending on the amount of items.