I'm new in ExtJS 4, and I make an extended Data Model. I want to listen model's set function. How can I make a custom listener on set, or override set with original set functions + extensions?
Asked
Active
Viewed 928 times
1 Answers
2
You can create your own set
function and call callParent
:
Ext.define('My.data.Model', {
extend: 'Ext.data.Model',
set: function () {
this.callParent(arguments); // original set functions
console.log(arguments); // extensions
}
});
Working example: http://jsfiddle.net/RyMGc/

CD..
- 72,281
- 25
- 154
- 163