shethvoss
7 Apr 2012, 8:01 PM
Working through the examples in the MVC tutorial (http://docs.sencha.com/ext-js/4-0/#!/guide/application_architecture-section-7), and get an "Error: not well-formed" in the error console, pointing to the users.json file, and specifically the first opening brace.
The error occurs just after I remove the explicit data statement in the store class and add the proxy (see below). I tried changing the json data (e.g. {succces: true}) to pure JSON format with double quotes, etc. but to no avail.
Am stumped, would appreciate a clue to get going again. Thanks!
Ext.define('AM.store.Users', {
extend: 'Ext.data.Store',
model: 'AM.model.User',
// data: [
// {name: 'Ed', email: 'ed@sencha.com'},
// {name: 'Tommy', email: 'tommy@sencha.com'}
// ]
// ,
autoLoad: true,
proxy: {
type: 'ajax',
url: 'data/users.json',
reader: {
type: 'json',
root: 'users',
successProperty: 'success'
}
}
});
The error occurs just after I remove the explicit data statement in the store class and add the proxy (see below). I tried changing the json data (e.g. {succces: true}) to pure JSON format with double quotes, etc. but to no avail.
Am stumped, would appreciate a clue to get going again. Thanks!
Ext.define('AM.store.Users', {
extend: 'Ext.data.Store',
model: 'AM.model.User',
// data: [
// {name: 'Ed', email: 'ed@sencha.com'},
// {name: 'Tommy', email: 'tommy@sencha.com'}
// ]
// ,
autoLoad: true,
proxy: {
type: 'ajax',
url: 'data/users.json',
reader: {
type: 'json',
root: 'users',
successProperty: 'success'
}
}
});