Pär,
Good catch. Right now the code persists first and then calls onSave,
but I agree with you that it should do those in the reverse order.
Please file a bug on this in the issue tracker.
A workaround which will allow you to save anytime is to set "autoSave"
to true on your property. This will force a disk write whenever the
value changes, which will make sure that when you update the value it
will get written to disk even if the explicit persist already occurred.
I hope this helps.
Cheers,
--Steve