1
I have a DataTable
with some data when I select a table row and click on finish process that row is saved in my database with the status Finalizado
and the Cargo
user logged in but this row only disappears from my table after several F5
or else if I leave and enter the table again. I am 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 that bean.
And that’s 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? That’s why it doesn’t update?
understand and how I clear the list?
– DiegoAugusto
You can simply remove the element from the list. For example:
lista.remove(itemSelecionado)
.– Luídne
It didn’t work, I made some changes now to update the table I have to perform the same action twice. Let’s say I have three items on the table, I finish first and second when I get to third I have to finish it 2x. Always the last action has to be performed twice
– DiegoAugusto