permalmberg
01/16/2017, 7:57 PMpermalmberg
01/16/2017, 7:58 PMsetOnMouseClicked
etc. I take it that in it self shouldn't be a problem?thomasnield
01/16/2017, 8:02 PMTableView
?thomasnield
01/16/2017, 8:02 PMthomasnield
01/16/2017, 8:03 PMedvin
01/16/2017, 8:11 PMedvin
01/16/2017, 8:12 PMpermalmberg
01/16/2017, 8:15 PMthomasnield
01/16/2017, 8:17 PMedvin
01/16/2017, 10:44 PMedvin
01/16/2017, 10:44 PMthomasnield
01/17/2017, 12:38 AMthomasnield
01/17/2017, 12:39 AMthomasnield
01/17/2017, 12:44 AMthomasnield
01/17/2017, 12:45 AMedvin
01/17/2017, 8:26 AMtable.enableDirtyTracking()
and the dirty columns should light up. To commit a row, do table.editModel.commit(item)
or table.editModel.commitSelected()
. Same for rollback
of course. You can get to the dirty state for an item by doing table.editModel.getDirtyState(item)
. On this object you can get the dirty columns via the dirtyColumns
map. The keys are the columns and the values are the initial value of that column for the given item (that's the value used to do rollback). Remember that commit just clears the dirty state really, the values are written into your domain objects as you edit them, but rollback can revert that. I recommend also enabeling regainFocusAfterEdit()
and enableCellEditing()
on the TableView for a more pleasant editing experience. Also take a look at https://github.com/edvin/tornadofx/blob/master/src/test/kotlin/tornadofx/testapps/TableViewDirtyTest.kt for some advanced usage, including rolling back for columns, context menu and some default button actions. Let me know how this goes and if something is unclear. Tonight I'll first try to finish the docs for the Workspace, then write the docs for this feature and finally create a screencast to show this feature.edvin
01/17/2017, 8:26 AMedvin
01/17/2017, 8:28 AMron
01/17/2017, 8:42 AMron
01/17/2017, 8:42 AMedvin
01/17/2017, 8:44 AMedvin
01/17/2017, 8:44 AMron
01/17/2017, 8:44 AMedvin
01/17/2017, 8:44 AMedvin
01/17/2017, 8:45 AMWorkspaceApp
🙂edvin
01/17/2017, 8:45 AMron
01/17/2017, 8:45 AMron
01/17/2017, 8:45 AMedvin
01/17/2017, 8:46 AMron
01/17/2017, 8:49 AM