title: Data not loading in TableView using JdbcSourceReader in [datafx]
body: <p>With the help of the datafx samples, I wrote a simple program to populate a tableView on a simple button click in javafx. My code is as follows</p>
  
  <pre><code>package testjavafx;
  
  import java.net.URL;
  import java.sql.ResultSet;
  import java.sql.SQLException;
  import java.util.ResourceBundle;
  import javafx.collections.FXCollections;
  import javafx.collections.ObservableList;
  import javafx.event.ActionEvent;
  import javafx.fxml.FXML;
  import javafx.scene.control.Button;
  import javafx.scene.control.TableColumn;
  import javafx.scene.control.TableView;
  import javafx.scene.control.cell.PropertyValueFactory;
  import org.datafx.reader.DataReader;
  import org.datafx.reader.JdbcSource;
  import org.datafx.reader.converter.JdbcConverter;
  import org.datafx.provider.ListDataProvider;
  
  
  public class SampleController {
  
      @FXML
      private ResourceBundle resources;
  
      @FXML
      private URL location;
  
      @FXML
      private TableColumn&lt;Person, String&gt; fNameCol;
  
      @FXML
      private TableColumn&lt;Person, String&gt; lNameCol;
  
      @FXML
      private TableView&lt;Person&gt; personTableView;
  
      @FXML
      private Button loadBtn;
  
  
      ObservableList&lt;Person&gt; myList =
              FXCollections.observableArrayList();;
  
      @FXML
      void handleLoadData(ActionEvent event) {
  
          JdbcConverter&lt;Person&gt; converter = new JdbcConverter&lt;Person&gt;() {
  
              @Override
              public Person convertOneRow(ResultSet rs) {
                  Person answer = new Person();
                  try{
                  answer.setFirstName(rs.getString("FirstName"));
                  answer.setLastName(rs.getString("LastName"));
                  return answer;
                  } catch(SQLException ex){
                      System.out.println("Sql exception in conversion\n");
                      ex.printStackTrace();
                  }
                  return null;
              }
          };
  
          DataReader&lt;Person&gt; dr = new JdbcSource&lt;&gt;("jdbc:mysql://localhost:3306/datafx?user=root&amp;password=","select * from person;", converter);
  
  //        
  //        while(dr.next()){
  //            System.out.println(dr.get());
  //        }
          //get the list now
  
          ListDataProvider&lt;Person&gt; lodp = new ListDataProvider&lt;&gt;(dr);
  
  
          //System.out.println(lodp.getData().size());
  
          lodp.setResultObservableList(myList);
          lodp.retrieve();
  
         myList= lodp.getData();
  //        System.out.println(myList.get(0));
          initializeTableView();
          System.out.println(myList.size());
  
      }
  
      @FXML
      void initialize() {
          assert fNameCol != null : "fx:id=\"fNameCol\" was not injected: check your FXML file 'Sample.fxml'.";
          assert lNameCol != null : "fx:id=\"lNameCol\" was not injected: check your FXML file 'Sample.fxml'.";
          assert loadBtn != null : "fx:id=\"loadBtn\" was not injected: check your FXML file 'Sample.fxml'.";
      }
  
      private void initializeTableView() {
  
  
          personTableView =  new TableView&lt;&gt;(myList);
          personTableView.setEditable(true);
          fNameCol = new TableColumn&lt;&gt;("First Name");
          fNameCol.setCellFactory(new PropertyValueFactory("firstName"));
          lNameCol = new TableColumn&lt;&gt;("Last Name");
          lNameCol.setCellValueFactory(new PropertyValueFactory("lastName"));
      }
  
  }
  </code></pre>
  
  <p>On the button click, nothing happens and console only shows 'regular query'.  I checked the <strong>DataReader</strong> instance and it show the values from the database, but the tableview is not populated. </p>
  
  <p>My person class is simple with StringProperty fields and getters and setters. </p>
  
  <p>Stuck on this for long time</p>