Hello,
I'm new to Sencha Architect. I try to read json data from a web server and want to popuplate a list with that.
So I created a JsonP store, because I read that this one should be used if the application doesn't run on the same domain. Next I created a Model and linked it to the store. Finally I updated the list template.
If I use dummy data, it works fine. But the server request (which delivers the same data) doesn't work. The following message appears: "Unable to load data using the supplied configuration."
Here's the generated Code:
Store:
Code:
Ext.define('GastroApp.store.TablesStore', {
extend: 'Ext.data.Store',
requires: [
'GastroApp.model.TableModel',
'Ext.data.proxy.JsonP',
'Ext.data.reader.Json'
],
config: {
autoLoad: true,
model: 'GastroApp.model.TableModel',
storeId: 'TablesStore',
proxy: {
type: 'jsonp',
url: 'http://kunde.sg-multimedia.de/gastro/json.php',
reader: {
type: 'json'
}
}
}
});
Model:
Code:
Ext.define('GastroApp.model.TableModel', {
extend: 'Ext.data.Model',
requires: [
'Ext.data.Field'
],
config: {
fields: [
{
name: 'uid',
type: 'int'
},
{
name: 'name',
type: 'string'
},
{
name: 'nummer',
type: 'string'
}
]
}
});
What am I doing wrong?