There are situations where many properties on model objects are updated, but you don't want the views to be notified on each property update.
Since the BaseModel.notify() method now is public, the following sceneario would be useful:
- Controller does RPC call and fetches lots of data
- Controller silences the model object
- Controller updates many props on the model object
- Controller reactivates ChangeListeners on model object
- Controller calls notify() with generic model update event to allow viewers to refresh themselves.
You bring up some good use cases. Here is what I am doing:
1. addChangeListener / removeChangeListener now use varargs. So you can add multiple listeners using the same method for adding a single listener. I prefer this over adding additional methods to the ChangeEventSource interface.
2. I added a new removeChangeListeners method.
2. I have added a setSilent method that enables / disables the firing of events.
How does that sound? Changes will go out in the next rev.