Finally, I figured out the problem. Can you spot it?
var js = new Ext.data.JsonStore({ url: 'myurl.jsp',
sortInfo: {field: 'name', direction: 'ASC'},
baseParams: { elementid: '1' },
reader: new Ext.data.JsonReader({
root: 'elements',
id: 'id'
}, [
{name: 'id'},
{name: 'name'}
])
});
js.load();
If not, maybe you are having the same problem I was.
Apparently, when you create a JsonStore, it creates its own JsonReader. So, if you specify a JsonReader, it will ignore yours and use the one it created. By changing the store to Ext.data.Store, it fixed the issue.
A simple fix!
1 comment:
thanks, had i been googled it earlier then would have saved 2 days
Post a Comment