PDA

View Full Version : When fire Event 'exception' in DirectStore??



darkman13
4 Nov 2011, 12:47 AM
Ext.onReady(function () { Ext.direct.Manager.addProvider(Ext.app.REMOTING_API); var ds = new Ext.data.DirectStore({ directFn: Grid.getData, paramsAsHash: false, paramOrder: ['start', 'limit', 'sort', 'dir'], root: 'data', idProperty: 'MV_ID', totalProperty: 'total', messageProperty: 'msg', successProperty: 'success', sortInfo: { field: 'MV_ID', direction: 'ASC' }, fields: [ { name: 'MV_ID', type: 'int' }, { name: 'MV_TITLE', type: 'string' }, { name: 'INTERNAL_COMMENT', type: 'string' }, { name: 'MV_INTRO', type: 'string' }, { name: 'CREATE_DT', type: 'date' } ], remoteSort: false, pageSize: 100, autoLoad: true, listeners: { /* load: function (store, records, success, operation, option) { console.log(operation); console.log(option); console.log(store); if (success === false) { Ext.MessageBox.show({ title: 'REMOTE EXCEPTION', //msg: operation.getError(), msg: '?????', icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK }); } }, */ load: function (store, records, success, operation, option) { console.log('load'); console.log(this); console.log(store); console.log(records); console.log(success); console.log(operation); console.log(option); }, beforeload: function (store, operation, option) { console.log('beforeload'); console.log(this); console.log(operation); console.log(option); }, beforeprefetch: function (store, operation, option) { console.log('beforeprefetch'); console.log(this); console.log(operation); console.log(option); }, exception: function(){ } } });
}
});


What is a sequence of function calls?

did "exception event" remove in extjs4 If not how does "exception event" triggered

mitchellsimoens
4 Nov 2011, 6:48 AM
If the exception event doesn't fire on the DirectStore (not one listed in API docs) then there is one on the proxy.