Well I changed some things and I still see the data coming back, however I am now getting this error and the data is still not loading into the Select:
Code:
Ext.data.JsonReader.getResponseData: Unable to parse JSON returned by Server
But I'm not sure why....my JSON looks good:
Code:
{"apps":[{"value":"T1","label":"Test1"}]}
Here is the new code:
Code:
var sourcesModel = Ext.regModel('mysource', {
fields: [
{name: "value", type: 'string'},
{name: "label", type: 'string'}
]
});
var store = new Ext.data.JsonStore({
id: 'sources-store',
model: Ext.ModelMgr.types['mysource'],
root: 'apps',
autoLoad: true,
proxy: {
type: 'ajax',
reader: {
type: 'json',
idProperty: 'value',
root: 'apps'
},
url: '/myurl/MobileServices',
actionMethods: {
read: 'POST'
},
extraParams: {
command: 'getApps',
arg: 'abc0xyz'
}
}
});
var sourcesWidget = new Ext.form.Select({
name: 'messageSource',
label: 'Message Source',
id: 'messageSources',
displayField: 'label',
valueField: 'value',
store: store,
options: store.data
});
So what am I missing? Is my JSON bad or something else?