I have a table column with datatype Integer. i want to make this column editable without changing the datatype to String anywhere. I used textfieldtablecell but it commits v
You can create table cell with StringConverter, that will convert your object to cell presentation. You can realize own StringConverter for your class
cell.setCellFactory(TextFieldTableCell.forTableColumn(new StringConverter() {
@Override
public String toString(AnyClass object) {
return null;
}
@Override
public AnyClass fromString(String string) {
return null;
}
}));
Also JavaFX contains some default converters. E.g. IntegerStringConverter for your case,
TextFieldTableCell.forTableColumn(new IntegerStringConverter())