Created
October 17, 2012 18:19
-
-
Save forcementor/3907154 to your computer and use it in GitHub Desktop.
Developing Mobile Applications with Force.com and Sencha Touch - Part 1, Step 6: Build Out The Sencha Touch Application - Add a Controller
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
| //============================================================================================== | |
| //CONTROLLERS | |
| //Controllers manage the communication of your application and the coordination between the | |
| //views and the model; they listen for the events emitted by the views and react accordingly. | |
| //============================================================================================== | |
| //The controller for the Leads list view | |
| Ext.define("PocketCRM.controller.Leads", { | |
| extend: "Ext.app.Controller", | |
| config: {}, | |
| // Base Class functions. | |
| launch: function () { | |
| console.log("launch"); | |
| this.callParent(arguments); | |
| //Load up the Store associated with the controller and its views. | |
| console.log("load Leads"); | |
| var leadsStore = Ext.getStore("Leads"); | |
| leadsStore.load(); | |
| }, | |
| init: function () { | |
| this.callParent(arguments); | |
| console.log("init"); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment