jchildress
04/24/2017, 1:41 AMedvin
04/24/2017, 1:41 AMjchildress
04/24/2017, 1:41 AMedvin
04/24/2017, 1:41 AMron
04/24/2017, 5:08 AMron
04/24/2017, 5:10 AMron
04/24/2017, 5:30 AMron
04/24/2017, 6:37 AMedvin
04/24/2017, 8:00 AMron
04/24/2017, 8:00 AMLocalDateTime
ron
04/24/2017, 8:01 AMedvin
04/24/2017, 8:01 AMedvin
04/24/2017, 9:59 AMnimakro
04/24/2017, 10:34 AMProject
locally and and a Project
object remotly which can by updated via Rest. Locally I have a ItemViewModel
called ProjectModel
I want that all changes will be automatially be synced. My idea was to inject my rest controller
int the ProjectModel
and override the commit
function. The commit
function will call the super.commit(...)
and call the rest-api
to sync the remote object... is this the right way to to it?nimakro
04/24/2017, 10:37 AMedvin
04/24/2017, 10:51 AMonCommit
callback on ViewModel
. I've never done it that way, but I don't think there is anything wrong with that approach.nimakro
04/24/2017, 10:54 AMonCommit
is that I don't know which properties changed since I would like to only send the changed properties, so how are you usually doing something like that if you don't use the ViewModel
?edvin
04/24/2017, 10:55 AMnimakro
04/24/2017, 10:58 AMedvin
04/24/2017, 10:59 AMnimakro
04/24/2017, 11:01 AMedvin
04/24/2017, 11:12 AMedvin
04/24/2017, 11:12 AMPersonModel
has three fields.edvin
04/24/2017, 11:14 AMcommits.filter { it.changed }
.nimakro
04/24/2017, 11:15 AMedvin
04/24/2017, 11:16 AMnimakro
04/24/2017, 11:16 AMedvin
04/24/2017, 11:17 AM