Hi,
I am just about to explore sencha architect and have created a project based on the MasterDetail template. Now I wanted to replace the existing store by a store that can access data from another domain. For simulation of the data response I entered the following data into mocky.io (thats also what mocky returns when opening the url):
Code:
{ "id": "1",
"firstName": "Max",
"lastName": "Mustermann""
}
The initially used store looks like this:
Code:
Ext.define('MasterDetail.store.People', {
extend: 'Ext.data.Store',
requires: [
'MasterDetail.model.Person',
'Ext.data.proxy.Memory',
'Ext.util.Sorter'
],
config: {
autoLoad: true,
data: [
{
id: 1,
firstName: 'Max',
lastName: 'Mustermann',
}
],
groupField: 'range',
model: 'MasterDetail.model.Person',
storeId: 'People',
proxy: {
type: 'memory'
},
sorters: {
property: 'lastName'
}
}
});
The new store looks like this
Code:
Ext.define('MasterDetail.store.MyJsonPStore', {
extend: 'Ext.data.Store',
requires: [
'MasterDetail.model.Person',
'Ext.data.proxy.JsonP',
'Ext.data.reader.Json'
],
config: {
model: 'MasterDetail.model.Person',
storeId: 'MyJsonPStore',
proxy: {
type: 'jsonp',
url: 'http://www.mocky.io/v2/531567e60aed02d001449883',
reader: {
type: 'json'
}
}
}
});
When I try to start the application i get only an empty screen with an empty title bar.
Thanks in advance for your suggestions
Peter