Here is the store code:
Ext.define('NG.store.WhatsNews', {
extend: 'NG.store.AbstractStore',
model: 'NG.model.auxClasses.notifications.WhatsNew',
alias: 'store.whatsnewstore',
autoLoad:true,
buffered: true,
pageSize: 50,
proxy: {
type: 'rest',
url: 'api/WhatsNew/'
}
});
Here is the model:
Ext.define('NG.model.auxClasses.notifications.WhatsNew', {
extend: 'Ext.data.Model',
idProperty:'iD',
fields: [
{ name: 'iD', type: 'int' },
{ name: 'createDate', type: 'date', dateFormat: 'c' },
{ name: 'businessArchive', type: 'string' },
{ name: 'isPin', type: 'boolean' },
{ name: 'previousWhatsNewEvents' }
],
// self association model
associations: [{
type: 'hasMany',
model: 'auxClasses.notifications.WhatsNew',
name: 'previousWhatsNewEvents',
primaryKey: 'id',
associationKey: 'previousWhatsNewEvents'
}
});
Here is the code from the controller:
init: function () {
var me = this;
me.control({
'whatsnewlist': {
whatsnewpinclick: function (rowIndex) {
var me = this,
store = me.getWhatsNewsStore(),
record = store.getAt(rowIndex);
record.set('isPin', !record.get('isPin'));
store.sync(); <<< THIS IS WHERE I FAILED
}
});
}...
Here is the error from the framework: (it fails under the store getNewRecords method)
It seems that Ext.data.PageMap class does not hold a definition for filterBy method.
Is that a known issue?
Is there a workaround?