I'm having a bit of a problem getting some of the data from a certain model to load. Here's a simplified version of my JSON representation:
Code:
"entry-list":[{
"submitter":{
"link":{
"href":"/restapi/2.0/entity/23f03fe70a16aed0d7e210357164e401/",
"rel":"entity",
"phid":"Administrator"
}
},
"id":"150858304dd049c3800645eadf07f78c",
"entities":{
"link":{
"href":"/restapi/2.0/entry/150858304dd049c3800645eadf07f78c/entities/",
"rel":"entities"
}
}
}
]
So, in my Model config, I can grab "id" quite simply,
and also "submitter" by using
Code:
{ name: 'submitter', mapping: 'submitter.link.phid' },
but I cannot figure out how to get the list of "entities". Is this something I can do within the model, or do I need a special extension of the JSON reader?
edit: For completeness, here is my Store implementation:
Code:
Ext.define("KT.store.EntryStore", {
extend: "Ext.data.Store",
config: {
model: "KT.model.Entry",
proxy: {
type: 'rest',
url: '/entry',
noCache: false,
limitParam: false,
startParam: false,
pageParam: false,
extraParams: {
page: "1",
rpp: "10"
},
reader: {
type: "json",
rootProperty: "entry-list"
}
},
}
});