I'm wondering how I could use the CheckBoxTableCell without a ObservableProperty. I'm using a simple boolean because I want to serialize the Data to my DerbyDB.
For sure there would be the possibility to make a SimpleBooleanProperty and annote it with @Transient and wrap it around my normal boolean active.
My boolean value is shown properly but I'm not able to store the new value after the Checkbox in my Tableview is clicked.
private void setupColActive() {
colActive.setCellValueFactory(new PropertyValueFactory<UserVillage, Boolean>("active"));
colActive.setCellFactory(CheckBoxTableCell.forTableColumn(colActive));
colActive.setEditable(true);
}
I've tried it with colActive.setOnEditCancel, colActive.setOnEditCommit and colActive.setOnEditStart in combo with print outlines but I'm not able to catch the new Value to store it. I'd like to find a way to get it working without wrapping into a @Transient SimpleBooleanProperty active.
Aucun commentaire:
Enregistrer un commentaire