1 Reply Latest reply on Nov 5, 2012 4:25 AM by 972422

    Updating tableview back into database table

      I am trying to display a recordset from mysql database table into a tableview in javafx. Maybe let's say get all records where invoice number is 101 i n the master table from the child records in the child table.(This is a typical master detail scenario.) After this I update the tableview add, delete, edit some records AND then I want to save this Tableview or rather update it back, synchronise into the database table.

      I request you to kindly help with sample code or any guidelines that will help me in this objective.
        • 1. Re: Updating tableview back into database table
          Here is the tutorial of tableView : http://docs.oracle.com/javafx/2/ui_controls/table-view.htm

          You can use the Java Class that mapped the database for ObservableList. Get all the record in the database and cover it to the java object. Then add them to the ObservableList to show on TableView. After add, update, edit,... Get the item in the ObservableList and update back to your database.

          I can't tell in detail. You should try this tutorial and if there are any more Specific Issue you can post another question here.