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
| {"action":"PocketCRMLeadController","method":"Edit","data":[[{"LastName":"Rogers","Id":"00Q5000000TXUh7EAH"}]],"type":"rpc","tid":8,"ctx":{"csrf":"RJwzNCf17ZNm_6plAMNqSGf5xEWfwVJcR4CPtjMVb4a2g38HryRgL0jyVfAn2GNyUSd.PHPwsl5sptP607AXKgFvCnGIKGLnvExkZV9ILTLCHMNdIjTHsdKYMwVYe2JNSfnZ8THOvpEld6_.px3lKp3rcx_q7NAX1oClG13LQCYR1BY_","vid":"06650000000D9rZ","ns":"","ver":25}} |
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
| ... | |
| limitParam: 'recordCount', // maps to QueryRequest.recordCount | |
| ... | |
| } | |
| (Apex) | |
| public class QueryRequest { | |
| ... | |
| Integer recordCount; | |
| ... |
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
| //The Lead model will include whatever fields are necssary to manage. | |
| Ext.define("PocketCRM.model.Lead", { | |
| extend: "Ext.data.Model", | |
| config: { | |
| idProperty: 'Id', | |
| fields: [ | |
| { | |
| name: 'Id', |
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
| public with sharing class PocketCRMLeadController { | |
| public PocketCRMLeadController() {} | |
| //======================================================================== | |
| //INNER CLASSES | |
| //These support data request/response transport for remoting. | |
| //======================================================================== | |
| // One of the parameters supplied by the DirectProxy read method. |
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. |
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
| onSyncLeadCommand: function () { | |
| console.log("onSyncLeadCommand"); | |
| //Get a ref to the store and remove it. | |
| var leadsStore = Ext.getStore("Leads"); | |
| //Resync the proxy, reload and activate the list. | |
| leadsStore.sync(); | |
| leadsStore.load(); | |
| this.activateLeadsList(); |
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
| slideLeftTransition: { | |
| type: 'slide', | |
| direction: 'left' | |
| }, | |
| slideRightTransition: { | |
| type: 'slide', | |
| direction: 'right' | |
| }, | |
| //View Transition Helper functions |
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
| config: { | |
| refs: { | |
| // We're going to lookup our views by alias. | |
| leadsListView: "leadslistview", | |
| leadEditorView: "leadeditorview", | |
| leadsList: "#leadsList" | |
| }, | |
| control: { |
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.application({ | |
| name: "PocketCRM", | |
| //Load the various MVC components into memory. | |
| models: ["Lead"], | |
| stores: ["Leads"], | |
| controllers: ["Leads"], | |
| views: ["LeadsList", "LeadEditor"], |
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.view.LeadEditor", { | |
| extend: "Ext.form.Panel", | |
| requires: "Ext.form.FieldSet", | |
| alias: "widget.leadeditorview", | |
| config: { | |
| scrollable: 'vertical', | |
| items: [{ |