1 Reply Latest reply: Nov 4, 2012 9:40 PM by 972422 RSS

    Refresh of TableView

      Hi guys,
      I've a problem with TableView in wich I add several Observable objects:
           for (Fornitore fornitore : worker.valueProperty().get()) {
            table.getItems().add(new ObservableFornitori(fornitore));
      I've a mechanism of history so I alway save the previous view in order to enable a back button from each view. So I've my list, that I'm clicking on an item and is opened the detail of entry; I modify some data and that return to the list with previous mechanism.
      When I go to a list view to edit view i sent to the edit view the ObservableItem so I can change its data on save button clicked. In despite of this my list is not updated, only when I sort a column then I can see the updated item.

      THanks very much
        • 1. Re: Refresh of TableView
          I might not understand your question well but I think you should set the new ObservableItem that have been editted back to the ObservableList of the table in the handle of the save button clicked. Something like this

          table.getItems().set(index, ObservableItem );
          // index is the index of the ObservableItem in the ObservableList that you send to the edit page
          //ObservableItem is the item with new value.

          Hope this could help