2016-11-24 1 views

답변

1

저장소 프록시에서 exception 이벤트를 찾고 있습니다.

체크 아웃이 바이올린 https://fiddle.sencha.com/#view/editor&fiddle/1l5m

Ext.define('MyApp.store.MyJsonStore', { 
    extend: 'Ext.data.Store', 

    requires: [ 
     'Ext.data.proxy.Ajax', 
     'Ext.data.reader.Json' 
    ], 

    autoLoad: true, 
    storeId: 'MyJsonStore', 
    proxy: { 
     type: 'ajax', 
     url: 'non-existing-data.json', 
     reader: { 
      type: 'json' 
     }, 
     listeners: { 
      exception: function (proxy, response, operation, eOpts) { 
       // debugger; 
      } 
     } 
    } 
});