If your model class (SongWraper) (SongWrapper? SongRapper...? ;)) has JavaFX-style property methods (i.e.
public class SongWraper {
private final StringProperty title = new SimpleStringProperty(this, "title", "");
public final String getTitle() {
return title.get();
}
public final void setTitle(String title) {
this.title.set(title);
}
public final StringProperty titleProperty() {
return title ;
}
}
then the onEditCommit shouldn't be necessary. The TextFieldTableCell binds its text property to the appropriate property in the model class. I think, because of this, the TextFieldTableCell doesn't fire the onEditCommit, though I am not sure on that last point.