Created
April 8, 2009 18:33
-
-
Save ttdonovan/91920 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| CDWeb.requestController = SC.DataSource.create( | |
| /** @scope CDWeb.requestController */ { | |
| retrieveRecords: function(store, storeKeys) { | |
| var storeKey = storeKeys[0] ; // only the first | |
| var id = store.idFor(storeKey) ; | |
| var rec = store.find(CDWeb.Data, id) ; | |
| $.ajax({ | |
| type: 'GET', | |
| dataType: 'json', | |
| url: rec.get('resourceURL'), | |
| success: function(response) { store.dataSourceDidComplete(storeKey, response) ; }, | |
| error: function(response) { console.log(response) ; } | |
| }) ; | |
| // store.dataSourceDidComplete(storeKey, dataHash, newId) | |
| } | |
| }) ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment