title: TableView, setting editable cells
body: <p>I try to make Table cells editable. I managed to do this with two Collumns that have String values in it, but I cant make this with columns that represent Integer values.</p>
  
  <p>Places with X is where compiler get the error:</p>
  
  <pre><code>The method setCellFactory(Callback&lt;TableColumn&lt;DataModel,Integer&gt;,TableCell&lt;DataModel,Integer&gt;&gt;) in the type TableColumn&lt;DataModel,Integer&gt; is not applicable for the arguments  (Callback&lt;TableColumn&lt;DataModel,String&gt;,TableCell&lt;DataModel,String&gt;&gt;)
  </code></pre>
  
  <p>and places with XX is where compiler get the error:</p>
  
  <pre><code>The method setOnEditCommit(EventHandler&lt;TableColumn.CellEditEvent&lt;DataModel,Integer&gt;&gt;) in the type TableColumn&lt;DataModel,Integer&gt; is not applicable for the arguments ((CellEditEvent&lt;DataModel, Integer&gt; event) -&gt; {})
  </code></pre>
  
  <p>Heres the code:</p>
  
  <pre><code>public void initialize(URL location, ResourceBundle resources) {
      //Tworzymy sobie kolumny, które będą odpowiadać oraz przyjmować konretne dane
      TableColumn&lt;DataModel, String&gt; nameColumn = new TableColumn&lt;DataModel, String&gt;("Name");
      nameColumn.setMinWidth(100);
      TableColumn&lt;DataModel, String&gt; surnameColumn = new TableColumn&lt;DataModel, String&gt;("Surname");
      surnameColumn.setMinWidth(100);
      TableColumn&lt;DataModel, Integer&gt; ageColumn = new TableColumn&lt;DataModel, Integer&gt;("Age");
      ageColumn.setMinWidth(100);
      TableColumn&lt;DataModel, Integer&gt; telNumberColumn = new TableColumn&lt;DataModel, Integer&gt;("Tel. Number");
      telNumberColumn.setMinWidth(100);
  
      //dodajemy kolumny do okna
      tableView.getColumns().addAll(nameColumn,surnameColumn,ageColumn,telNumberColumn);
  
      //podajemy nazwy zmiennych, których wartości mają się wyświetlać w poszczególnych kolumnach
      nameColumn.setCellValueFactory(new PropertyValueFactory&lt;&gt;("sName"));
      surnameColumn.setCellValueFactory(new PropertyValueFactory&lt;&gt;("sSurname"));
      ageColumn.setCellValueFactory(new PropertyValueFactory&lt;&gt;("iAge"));
      telNumberColumn.setCellValueFactory(new PropertyValueFactory&lt;&gt;("iPhoneNumber"));
  
      //Sprawiamy że poszczególne kolumny stają się edytowalne
      nameColumn.setCellFactory(TextFieldTableCell.&lt;DataModel&gt;forTableColumn());
      nameColumn.setOnEditCommit((CellEditEvent&lt;DataModel, String&gt; event) -&gt; {
          ((DataModel) event.getTableView().getItems(). get(event.getTablePosition().getRow())).  setsName(event.getNewValue());
      });
      surnameColumn.setCellFactory(TextFieldTableCell.&lt;DataModel&gt;forTableColumn());
      surnameColumn.setOnEditCommit((CellEditEvent&lt;DataModel, String&gt; event) -&gt; {
          ((DataModel) event.getTableView().getItems(). get(event.getTablePosition().getRow())).  setsSurname(event.getNewValue());
      });
  X   ageColumn.setCellFactory(TextFieldTableCell.&lt;DataModel&gt;forTableColumn());
  XX  ageColumn.setOnEditCommit((CellEditEvent&lt;DataModel, Integer&gt; event) -&gt; {
      //    ((DataModel) event.getTableView().getItems(). get(event.getTablePosition().getRow())).  setiAge(Integer.valueOf(event.getNewValue()));
  
      });
  X   telNumberColumn.setCellFactory(TextFieldTableCell.&lt;DataModel&gt;forTableColumn());
  XX  telNumberColumn.setOnEditCommit((CellEditEvent&lt;DataModel, Integer&gt; event) -&gt; {
   //         ((DataModel) event.getTableView().getItems(). get(event.getTablePosition().getRow())).  setiPhoneNumber(Integer.valueOf(event.getNewValue()));
  
      });
  
      tableView.setPlaceholder(new Label("Pust tabelka!"));//jaki element dodać jeśli tabelka nie jest wyświetlona
      tableView.setEditable(true);
  
      tableView.setItems(dataList); //wczytujemy dane do przygotowanej tabelki
  
      buttAdd.setOnAction((ActionEvent e) -&gt; {
          buttAddAction(e);
      });
  }
  </code></pre>
  
  <p>Im taking oracle TableView tutorial, and its quite difficult. Help.</p>