kmalakoff/knockback — Issue #5: Model locking and undo
Author: kmalakoff
Created: 2011-11-03 08:47:20+00:00
State: open

I'm not sure if this is necessary, but wanted to solicit some feedback.

1) Live changes: Currently, when I make a view for editing and model, I typically save the model attributes, and if the edit is cancelled, I restore them. So in short by default, all changes are propagated live.

2) Pos-commit changes: If you don't want to propagate your changes live, you can clone() your model and edit the clone. If the changes are accepted, you can do a set() from the clone's attributes into the original.

Is this enough or does there need to be a lock model attribute option and the caller chooses when to commit? Or something else?! Obviously, this would complicate things.

Please let me know if you have a use case that isn't neatly handled by 1) and 2), and how you would like to see it handled.