-
14 May 2012 12:25 AM #1
Answered: Overrideing Ext.data.Store methods breaks functionality.
Answered: Overrideing Ext.data.Store methods breaks functionality.
Good day. I ran into some trouble with Ext.data.Store class. Maybe i've got wrong idea about the Class system?
I want to do pre-processing of incoming data.
There is my code :
Overriding the constructor makes Ext.StoreManager fail with lookup and overridden applyData passes only one record to the store.Code:Ext.define('App.store.PagesStore', { extend : 'Ext.data.Store', requires: ['App.model.Page'], config: { model : 'App.model.Page', data : pages, }, constructor: function(config) { this.callParent(config); }, applyData : function(data) { this.callParent(data); }, });
-
Best Answer Posted by antiplaka
Passing arguments to parent's function seems to do the trick :
Code:Ext.define('App.store.PagesStore', { extend : 'Ext.data.Store', requires: ['App.model.Page'], config: { model : 'App.model.Page', data : pages, }, constructor: function(config) { this.callParent(arguments); }, applyData : function(data) { /* do the data manipulations */ this.callParent(arguments); }, });
-
14 May 2012 12:52 AM #2
resolved
resolved
Passing arguments to parent's function seems to do the trick :
Code:Ext.define('App.store.PagesStore', { extend : 'Ext.data.Store', requires: ['App.model.Page'], config: { model : 'App.model.Page', data : pages, }, constructor: function(config) { this.callParent(arguments); }, applyData : function(data) { /* do the data manipulations */ this.callParent(arguments); }, });


Reply With Quote