This discussion is archived
1 Reply Latest reply: Nov 4, 2012 8:25 PM by 972422 RSS

Updating tableview back into database table

963881 Newbie
Currently Being Moderated
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
    972422 Newbie
    Currently Being Moderated
    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.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points