dojo.data.api.Notification.onSet
dojo.require("dojo.data.api.Notification");
defined in dojo/data/api/Notification.js
This function is called any time an item is modified via setValue, setValues, unsetAttribute, etc. Its purpose is to provide a hook point for those who wish to monitor actions on items in the store in a simple manner. The general expected usage is to dojo.connect() to the store's implementation and be called after the store function is called.
parameter | type | description |
---|---|---|
item | The item being modified. | |
attribute | The attribute being changed represented as a string name. | |
oldValue | Object|Array | The old value of the attribute. In the case of single value calls, such as setValue, unsetAttribute, etc, this value will be generally be an atomic value of some sort (string, int, etc, object). In the case of multi-valued attributes, it will be an array. |
newValue | Object|Array | The new value of the attribute. In the case of single value calls, such as setValue, this value will be generally be an atomic value of some sort (string, int, etc, object). In the case of multi-valued attributes, it will be an array. In the case of unsetAttribute, the new value will be 'undefined'. |