Created
March 6, 2011 14:56
-
-
Save topherfangio/857345 to your computer and use it in GitHub Desktop.
Incorrect but Working Binding
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
Pharos360.labelsController = SC.ArrayController.create( | |
/** @scope Pharos360.labels.prototype */ { | |
// TODO: Add your own code here. | |
}) ; |
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
/* | |
* This is the portion of the Ki state that sets up the labels' store. | |
*/ | |
enterState: function() { | |
/* | |
* Normally we'd start talking to the server and setup a callback that would | |
* fire when the data was received (or we'd observe the datastore and wait for the | |
* data to be available). Since this is just a fixtures DataStore...we won't worry | |
* about that currently. | |
*/ | |
var coursesStore = Pharos360.store.find(Pharos360.Course); | |
var labelsStore = Pharos360.store.find(Pharos360.Label); | |
if (coursesStore != null && labelsStore != null) { | |
// Setup the controllers | |
Pharos360.coursesController.set('content', coursesStore); | |
Pharos360.labelsController.set('content', labelsStore); | |
// Show the UI | |
Pharos360.getPath('mainPage.mainPane').append(); | |
} else { | |
console.log('An error occured while attempting to load the course/label information.'); | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment