Created
April 17, 2009 13:29
-
-
Save edspencer/97023 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//taken from a recent project - tells ExtMVC.Model to use a ScriptTagProxy and a remote host | |
Ext.apply(ExtMVC.Model.Adapter.REST.classMethods, { | |
urlExtension: '.json', | |
// port: 3000, | |
// host: 'http://localhost', | |
host: 'http://widgets.jungle-media.com', | |
proxyType: Ext.data.ScriptTagProxy, | |
parseSingleLoadResponse: function(response, options, callbacks) { | |
var m = this.getReader().readRecords(eval("(" + response.responseText + ")")); | |
if (m && m.records[0]) { | |
m.records[0].newRecord = false; | |
callbacks.successFn.call(options.scope, m.records[0]); | |
} else { | |
callbacks.failureFn.call(options.scope, response); | |
}; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment