1
In my view you have p:commandButton with a method that adds an item to a p:datatable. By clicking the button to call the method to add the first item, it is correctly added to the datatable, but by clicking the button to add another item, the method is simply no longer called. In addition, the p:ajax you have in the view also stop working and no error appears on the console. The curious thing is that sometimes I test works and sometimes not.
View
Add Method in Controller
public void adicionar() {
if(diasSemanaSelecionados != null) {
responsabilidadeTecnica.setDiasSemana(Arrays.asList(diasSemanaSelecionados));
}
responsabilidadeTecnica.setHorarioTrabalho(s);
responsabilidadeTecnica.setFimContrato(null);
responsabilidadesTecnicas.add(responsabilidadeTecnica);
renderizaAdicionarResponsavelTecnico = false;
}