Store: отловить событие success=false
Есть Store в который приходят данные.
Ext.define('App.store', {
extend: 'Ext.data.Store',
model: 'App.model',
sorters: [{
property: 'date_start',
direction: 'ASC'
}],
remoteSort: true,
autoLoad: true,
proxy: {
type: 'ajax',
url: 'cl.php',
reader: {
type: 'json',
root: 'pens',
totalProperty: 'total',
successProperty: 'success',
idProperty: 'id'
}
}
});
Как сделать так, что бы при приходе сообщения от сервера: Код:
'{"status":false,"text":"Опиcание"}'Ведь обычно, в Store приходит сообщение типа: Код:
{ "success" : true, "total":"nbrows","root": "arr" } |
Ext.define('App.store', {
extend: 'Ext.data.Store',
model: 'App.model',
sorters: [{
property: 'date_start',
direction: 'ASC'
}],
remoteSort: true,
autoLoad: true,
proxy: {
type: 'ajax',
url: 'cl.php',
reader: {
type: 'json',
root: 'pens',
totalProperty: 'total',
successProperty: 'success',
idProperty: 'id'
},
*!*
listeners: {
exception: function (proxy, response, operation, eOpts) {
if (window.console && console.log)
console.log("Proxy.Exception (%o)", arguments);
}
}
*/!*
}
});
??? |
| Часовой пояс GMT +3, время: 21:19. |