Hello my JSON is: (formatted for better reading)
{"status":{"status":0,"msg":"Ok","protocolversion":"extjs.json"},
"list":[{"getLogfiles":[
{"key":"0","value":"...lugin\/monitor\/files\/x_worker_error.log"},
{"key":"1","value":"...les\/x-worker01-progress.log.1331769600"},
{"key":"2","value":"...\/application\/x\/plugin\/monitor\/files\/Test.log"},
{"key":"3","value":"...ind\/plugin\/monitor\/files\/logfile_for_navi_test.log"},
{"key":"4","value":"...lugin\/monitor\/files\/logfilefilter_worker_error.log"}]
}]
}
This json data is loaded successfully and I can print it on the console.log() but it is not loaded to my store:
...
Ext.define( 'Xxx.plugins.monitor.store.GridLogfiles', {
extend : 'Ext.data.Store',
mixins: [
'Deft.mixin.Injectable'
],
model: 'Xxx.plugins.monitor.model.GridLogfiles',
proxy : {
type : 'ajax',
url : 'xxx',
extraParams: {
user : 'test',
pass : 'test',
vers : 'extjs.json',
module : 'monitor',
func : 'getLogfiles'
},
reader : {
type: 'json',
root: 'list[0].getLogfiles',
// root: 'list',
successProperty:false
}
}
, autoLoad: true
} );
...
I have tried both root: 'list'
and root: 'list[0].getLogfiles
In console.log()
the data is found under rawData (obj) -> list (array) -> 0 -> getLogfiles (array) -> 0, 1, 2 -> key, value
What is wrong? Thanks!
So I fix it with:
root: 'list'
and changing Json to:
and using
Ext.create()
instead of DeftJsinject: {}
Thanks for the help.