title: TableView doesn't update all columns
body: <p>I'm trying to get into JavaFX by making simple applications. Right now I'm working on something that can be called as "employees database" which mean to store some data in table and tree, where tree sorts employees by department. When you hit the "add worker" label in MenuBar hbox is displaying, and after filing its textfields and clicking "add" button written data should appear in table. Problem is that TableView updates all of the columns except "Years Worked" and "Department" column. I read some tips about cannonical variable names for proper valuefactory usage but I stil can't get over this.</p>
  
  <pre><code>public class Main extends Application {
  
  WTable table = new WTable();
  WTree tree = new WTree();
  WMenu menu = new WMenu();
  WTextField addFirstName = new WTextField("First Name");
  WTextField addSecondName = new WTextField("Second Name");
  WTextField addLastName = new WTextField("Last Name");
  WTextField addDep = new WTextField("Department");
  WTextField addYears = new WTextField("Years Worked");
  WTextField addSalary = new WTextField("Salary");
  WTextField addAge = new WTextField("Age");
  WButton addButton = new WButton("Add");
  ObservableList&lt;Model&gt; mList = FXCollections.observableArrayList();
  HBox addBox = new HBox();
  
  
  private class WTable extends TableView&lt;Model&gt; {
  
      private TableColumn&lt;Model, String&gt; fNameCol;
      private TableColumn&lt;Model, String&gt; lNameCol;
      private TableColumn&lt;Model, String&gt; sNameCol;
      private TableColumn&lt;Model, String&gt; depCol;
      private TableColumn&lt;Model, String&gt; yearCol;
      private TableColumn&lt;Model, String&gt; salaryCol;
      private TableColumn&lt;Model, String&gt; ageCol;
  
  
      public WTable() {
          super();
          fNameCol = new TableColumn&lt;Model, String&gt;("First Name");
          fNameCol.setMinWidth(100);
          fNameCol.setCellValueFactory(
                   new PropertyValueFactory&lt;Model, String&gt;("firstName"));
  
          sNameCol = new TableColumn&lt;Model, String&gt;("Second Name");
          sNameCol.setMinWidth(100);
          sNameCol.setCellValueFactory(
                  new PropertyValueFactory&lt;Model, String&gt;("secondName"));
  
          lNameCol = new TableColumn&lt;Model, String&gt;("Last Name");
          lNameCol.setMinWidth(100);
          lNameCol.setCellValueFactory(
                  new PropertyValueFactory&lt;Model, String&gt;("lastName"));
  
  
  
          depCol = new TableColumn&lt;Model, String&gt;("Department");
          depCol.setMinWidth(100);
          depCol.setCellValueFactory(
                  new PropertyValueFactory&lt;Model, String&gt;("department"));
  
          yearCol = new TableColumn&lt;Model, String&gt;("Years Worked");
          yearCol.setMinWidth(100);
          yearCol.setCellValueFactory(
                  new PropertyValueFactory&lt;Model, String&gt;("yearsWorked"));
  
          salaryCol = new TableColumn&lt;Model, String&gt;("Salary");
          salaryCol.setMinWidth(100);
          salaryCol.setCellValueFactory(
                  new PropertyValueFactory&lt;Model, String&gt;("salary"));
  
          ageCol = new TableColumn&lt;Model, String&gt;("Age");
          ageCol.setMinWidth(100);
          ageCol.setCellValueFactory(
                  new PropertyValueFactory&lt;Model, String&gt;("age"));
  
  
  
  
          this.getColumns().addAll(fNameCol, sNameCol, lNameCol, depCol,
                  yearCol, salaryCol, ageCol);
          this.setEditable(false);
  
      }
  }
  
  private class WButton extends Button {
      public WButton(String desc) {
          super(desc);
          this.setPrefWidth(50);
  
          this.setOnMouseClicked(new EventHandler&lt;MouseEvent&gt;() {
  
              @Override
              public void handle(MouseEvent event) {
                  mList.add(new Model(addFirstName.getText(), addSecondName.getText(), addLastName.getText(),
                          addDep.getText(), addAge.getText(), addYears.getText(),
                          addSalary.getText()));
  
  
  
              }
  
          });
  
      }
  }
  
  private class WTree extends TreeView&lt;String&gt; {
      private TreeItem&lt;String&gt; rootItem;
      private TreeItem&lt;String&gt; sItem;
      private TreeItem&lt;String&gt; aItem;
      private TreeItem&lt;String&gt; iItem;
      private TreeItem&lt;String&gt; uItem;
  
      public WTree() {
          super();
          rootItem = new TreeItem&lt;String&gt;("Employees");
          sItem = new TreeItem&lt;String&gt;("Sales Department");
          aItem = new TreeItem&lt;String&gt;("Accounts Department");
          iItem = new TreeItem&lt;String&gt;("IT Support");
          uItem = new TreeItem&lt;String&gt;("Undercover");
  
          this.setRoot(rootItem);
          rootItem.getChildren().addAll(sItem, aItem, iItem, uItem);
  
          rootItem.setExpanded(true);
      }
  }
  
  private class WTextField extends TextField {
      public WTextField(String desc) {
          super();
          this.setPromptText(desc);
          this.setPrefWidth(100);
  
      }
  }
  
  
  private final class WMenu extends MenuBar {
      public WMenu() {
          super();
          Menu menuAdd = new Menu("Add");
          Menu menuEdit = new Menu("Edit");
          Menu addWorker = new Menu("Add Worker");
          Menu addDepartment = new Menu("Add Department");
          Menu editWorker = new Menu("Edit Worker");
  
          addWorker.setOnAction(new EventHandler&lt;ActionEvent&gt;() {
  
              @Override
              public void handle(ActionEvent t) {
                    addBox.setVisible(true);
              }
          });
  
          this.getMenus().addAll(menuAdd, menuEdit);
          menuAdd.getItems().addAll(addWorker, addDepartment);
          menuEdit.getItems().addAll(editWorker);
      }
  }
  
  @Override
  public void start(Stage primaryStage) {
      try {
          primaryStage.setTitle("Employees");
          table.setItems(mList);
          GridPane grid = new GridPane();
  
          addBox.getChildren().addAll(addFirstName, addSecondName, addLastName,
                  addDep, addYears, addSalary, addAge, addButton);
  
  
          addBox.setVisible(false);
  
          grid.add(menu, 0, 0, 2, 1);
          grid.add(table, 1, 1);
          grid.add(tree, 0, 1);
          grid.add(addBox, 0, 2, 2, 1);
          Scene scene = new Scene(grid);
          primaryStage.setScene(scene);
          primaryStage.show();
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  
  public static void main(String[] args) {
      launch(args);
  }
      }
  </code></pre>
  
  <p>And Model class</p>
  
  <pre><code>    public class Model {
  
  private final SimpleStringProperty firstNameProperty;
  private final SimpleStringProperty secondNameProperty;
  private final SimpleStringProperty lastNameProperty;
  private final SimpleStringProperty departmentProperty;
  private final SimpleStringProperty ageProperty;
  private final SimpleStringProperty yearsWorkedProperty;
  private final SimpleStringProperty salaryProperty;
  
  public Model(String fName, String sName, String lName, 
          String func, String age, String years, String salary) {
      this.firstNameProperty = new SimpleStringProperty(fName);
      this.lastNameProperty = new SimpleStringProperty(lName);
      this.secondNameProperty = new SimpleStringProperty(sName);
      this.departmentProperty = new SimpleStringProperty(func);
      this.ageProperty = new SimpleStringProperty(age);
      this.yearsWorkedProperty = new SimpleStringProperty(years);
      this.salaryProperty = new SimpleStringProperty(salary);
  }
  
  public void setFirstName(String newName) {
      firstNameProperty.set(newName);
  }
  
  public String getFirstName() {
  
      return firstNameProperty.get();
  
  }
  
  public void setLastName(String newName) {
      lastNameProperty.set(newName);
  }
  
  public String getLastName() {
  
      return lastNameProperty.get();
  
  }
  
  public void setSecondName(String newName) {
      secondNameProperty.set(newName);
  }
  
  public String getSecondName() {
  
      return secondNameProperty.get();
  }
  
  public void setAge(String newAge) {
      ageProperty.set(newAge);
  }
  
  public String getAge() {
      return ageProperty.get();
  }
  
  public void setYears(String newY) {
      yearsWorkedProperty.set(newY);
  }
  
  public String getYears() {
      return yearsWorkedProperty.get();
  }
  
  public void setSalaray(String newSal) {
      salaryProperty.set(newSal);
  }
  
  public String getSalary() {
      return salaryProperty.get();
  }
  
  public void setDepartment(String newFunc) {
      departmentProperty.set(newFunc);
  }
  
  String getDepartment() {
      return departmentProperty.get();
  }
      }
  </code></pre>