dobie_
15 Dec 2011, 5:11 PM
Hello,
I have a DataView set up like this (BrowsePage extends Ext.DataView):
Ext.create('my.app.BrowsePage', {
id: 'searchResults',
itemTpl: '<h1>hi!</h1>',
store: {
autoLoad: true,
fields: ['applications', 'query'],
proxy: {
type: 'ajax',
url: Settings.searchUrl,
reader: {
type: 'json',
root: 'MyApp::Search',
totalProperty: 'matchcount'
}
}
}
});
But Settings.searchUrl contains invalid JSON (and this will eventually be on a foreign server so I can't control that data). I need to run my custom Data.stripChars() function on the string before the JSON reader tries to parse it. Does anyone know of a way to do this while still defining my ajax proxy within the Store like this?
I have a DataView set up like this (BrowsePage extends Ext.DataView):
Ext.create('my.app.BrowsePage', {
id: 'searchResults',
itemTpl: '<h1>hi!</h1>',
store: {
autoLoad: true,
fields: ['applications', 'query'],
proxy: {
type: 'ajax',
url: Settings.searchUrl,
reader: {
type: 'json',
root: 'MyApp::Search',
totalProperty: 'matchcount'
}
}
}
});
But Settings.searchUrl contains invalid JSON (and this will eventually be on a foreign server so I can't control that data). I need to run my custom Data.stripChars() function on the string before the JSON reader tries to parse it. Does anyone know of a way to do this while still defining my ajax proxy within the Store like this?