I have an ExtJS store with an ajax proxy and json reader:
Ext.create('Ext.data.Store', {
proxy: {
type: 'ajax',
url: '...',
reader: {
type: 'json',
root: 'data',
totalProperty: 'totalCount',
messageProperty: 'message',
successProperty: 'success'
},
...
This is what I get from the server:
data: [...]
message: "I want to read this string after the store is loaded"
success: true
totalCount: x
Now I want to access the ‘message’ when the store is loaded – where do I get it? I looked a lot but I can’t find a place to hook in? The only listener in the proxy is exception, that doesn’t really help me.
use store
loadevent:UPDATE
It appears that documentation for load event is wrong. The correct list of arguments is
(store, records, successful)(no operation argument). Therefore the solution above wouldn’t work.However there is reader’s
rawDataproperty which can help: