Created
October 17, 2012 21:25
-
-
Save forcementor/3908312 to your computer and use it in GitHub Desktop.
Developing Mobile…Force.com and Sencha-Part 2, Step 7: Add Apex Remoting - Modify Store
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
| Ext.define("PocketCRM.store.Leads", { | |
| extend: "Ext.data.Store", | |
| requires: "Ext.data.proxy.LocalStorage", | |
| config: { | |
| model: "PocketCRM.model.Lead", | |
| //Fetch the data from the custom Apex controller method | |
| //which will return a simple list of Leads as JSON on load. | |
| //THE LINE BELOW MUST BE REMOVED AFTER ADDING DATA PROXY LATER! | |
| data: {!Leads}, | |
| autoLoad: true, | |
| pageSize: 50, | |
| //Create a grouping; be certain to use a field with content or you'll get errors! | |
| groupField: "Status", | |
| groupDir: "ASC", | |
| //Create additional sorts for within the Group. | |
| sorters: [{ | |
| property: 'LastName', | |
| direction: 'ASC' | |
| }, { | |
| property: 'FirstName', | |
| direction: 'ASC' | |
| }] | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment