1 Reply Latest reply on Nov 5, 2012 3:58 AM by 972422

    JavaFX and databases

      I'm wondering about using ObservableLists / Maps for tracking changes and updating the database.

      I'd be pleased if anyone can provide directions for this.
        • 1. Re: JavaFX and databases
          Your question is a bit confused. I'm new to javaFX so as far as I know the ObservableList/Map are use to store data in TableView. You can use the Java class that map the table in database for ObservaleList. Here is the tutorial that create a TableView that have cell that can be editable(Example 13-10) :
          The edit data will also be updated to the ObservableList in this code
          new EventHandler<CellEditEvent<Person, String>>() {
          public void handle(CellEditEvent<Person, String> t) {
          ((Person) t.getTableView().getItems().get(

          You can get the editted items out and update to the the database in the handle. Something like this :
          //get the updated item from the ObservableList;
          Person updatedPerson = (Person) t.getTableView().getItems().get(t.getTablePosition().getRow());
          //update the changed item to database

          Hope this will help you