1
I’m having a problem going through a list.
Man for
this way:
for (int i = 0; i < listaCaixaAbertos().size(); i++) {
listaCaixaAbertos().get(i).setFechado(Boolean.TRUE);
salvar(listaCaixaAbertos().get(i));
}
My list goes like this:
public List<LancamentoCaixa> listaCaixaAbertos() {
Query q = em.createQuery("FROM LancamentoCaixa As a WHERE a.fechado = false");
return q.getResultList();
}
Every time I go through the list I want to set false
to the variable fechado
.
However to it Does not change all the data of this list, to change all I have to click several times depending on the amount of items.
Just what I needed! Problem solved, thank you very much.
– Leandro Santos