0
I have a rating registration screen and a rating management screen from a library system. After registering a new rating, I would like the Tableview ratings, on the management screen, to be updated showing the new record. I repeat the query in the bank and pass the values of the new query to the list, but it does not update on the screen. Here I call the method to redo the query after saving the information in the bank:
{Rotina que salva a informação no banco}
GerenciarClassificacoesController controller = new GerenciarClassificacoesController();
controller.atualizarTableView();
This is where he redoes the query and arrow the items in Tableview:
public class GerenciarClassificacoesController(){
@FXML
private void TableView<ClassificacaoLivro> tableClassificacoes;
...
public void atualizarTableView(){
itens = FXCollections.observableArrayList(servico.getClassificacoes());
tableClassificacoes.setItems(itens);
tableClassificacoes.refresh();
}
}
It falls into the method updateTableView, it redoes the database query and brings the right information, but it does not arrow in Tableview. Please help me :p NOTE: This same method (updateTableView) is called in the screen initialize, and works correctly, when I call out (another file) it doesn’t work.