title: javafx StringConverter Last Object
body: <p>i have a little problem for creating an editable ListView.</p>
  
  <p>so i have a City Class with two field : <code>id</code> and <code>name</code>, i have created a ObservableList of cities from a database and assigned it to my ListView, and i have created my cellFactory :</p>
  
  <pre><code>@DatabaseTable(tableName = "city")
  public class City {
  
      @DatabaseField(generatedId = true)
      private int id;
  
      @DatabaseField
      private String name;
  
      public City() {}
  }
  </code></pre>
  
  <hr>
  
  <pre><code>citiesList.setCellFactory(new Callback&lt;ListView&lt;City&gt;, ListCell&lt;City&gt;&gt;() {
  
              @Override
              public ListCell&lt;City&gt; call(ListView&lt;City&gt; param) {
  
                  ListCell&lt;City&gt; cells = new TextFieldListCell&lt;&gt;(new StringConverter&lt;City&gt;() {
  
                      @Override
                      public String toString(City object) {
                          return object.getName().trim();
                      }
  
                      @Override
                      public City fromString(String string) {
                          // how to modify the object that was in the cell???
                          return null;
                      }
                  });
  
                  return cells;
              }
          });
  </code></pre>
  
  <p>I want to know if its possible to get a reference of the current value in the cell(City) when <code>fromString</code> is called</p>
  
  <p>i want to do that to allow user to change City name without having to change its Id field.</p>