thomasnield
01/16/2017, 6:49 PMTableView
...thomasnield
01/16/2017, 6:50 PMedvin
01/16/2017, 6:51 PMtornadofx.experimental
package, and move it when it's complete.permalmberg
01/16/2017, 6:52 PMedvin
01/16/2017, 6:52 PMedvin
01/16/2017, 6:52 PMthomasnield
01/16/2017, 6:55 PMcommit()
and rollback()
functions ideally. But let me think about this... maybe these need to be methods in the TableEditModel
that accept the items as arguments.thomasnield
01/16/2017, 6:55 PMcellFormat()
and attaching a listener for a specific dirty property there?edvin
01/16/2017, 6:57 PMthomasnield
01/16/2017, 6:57 PMcommit()
or rollback()
, and then clicking a Button
on a toolbar? That is typically what I would do at work...thomasnield
01/16/2017, 6:58 PMTableEditModel
, or whatever we call this, accept items and return ObservableValues through methods that should be pretty flexible for most use cases.thomasnield
01/16/2017, 6:59 PMmyTableEditModel.commit(item1)
thomasnield
01/16/2017, 6:59 PMmyTableEditModel.rollback(item1)
thomasnield
01/16/2017, 7:00 PMval dirtyState = myTableEditModel.dirtyStateFor(item1)
thomasnield
01/16/2017, 7:00 PMedvin
01/16/2017, 7:01 PMedvin
01/16/2017, 7:01 PMedvin
01/16/2017, 7:01 PMedvin
01/16/2017, 7:02 PMthomasnield
01/16/2017, 7:02 PMedvin
01/16/2017, 7:02 PMedvin
01/16/2017, 7:02 PMTableViewEditModel
edvin
01/16/2017, 7:02 PMthomasnield
01/16/2017, 7:02 PMTableViewEditModel
makes sense. Is there anything about editing it does not encapsulate?edvin
01/16/2017, 7:03 PMedvin
01/16/2017, 7:07 PMthomasnield
01/16/2017, 7:13 PMthomasnield
01/16/2017, 7:13 PMItemViewModel
if you want to track the selected item.thomasnield
01/16/2017, 7:15 PMedvin
01/16/2017, 7:15 PMmodel.commit(item)
as well as model.commitSelectedItem()
. Same for rollback. Then it's easy to make a button bar like so: