私のアプリケーションでは、リストと詳細(フォーム)があります。リスト項目がクリックされたときにデータを詳細ビュー(フォームのテキストフィールドにデータを設定)にロードしたいと思います。リストと詳細の両方について、リモートサーバーからデータを取得しています。私はMVCをフォローしています。
これで、listItemをクリックすると、サーバーからデータを取得して保存し、詳細ビューを表示することができます。しかし、ストアからフォームのテキストフィールドにデータをバインドすることはできません。
モデル
Ext.define('App.model.Details', {
    extend: 'Ext.data.Model',
    config: {
        fields: [
            {name: 'Name',  type: 'string'},
            {name: 'BillingStreet',  type: 'string'},
            {name: 'BillingCity',  type: 'string'}
        ]
    }
});
店
Ext.define('App.store.Details', {
    extend: 'Ext.data.Store',
    config: {
        model: 'App.model.Details',
        autoLoad :true,
        grouper : function(record) {
            return record.get('Name')[0];
        },
    }
});
リストビュー
Ext.define('App.view.View', {
    extend: 'Ext.List',
    alias:'widget.contactlist',
    fullscreen: true,
    id: 'contactlist',
    config:{
        disableSelection:true,
        store:'Contacts',
        itemTpl:'{Name}',
        items:[
        {
            xtype:'toolbar',
            docked:'top',
            title:'Leeds List'
        }
        ]
    }
});
詳細ビュー
Ext.define("App.view.ListDetail", {
    extend: "Ext.form.Panel",
    requires: "Ext.form.FieldSet",
    alias: "widget.listDetail",
    config:{
        scrollable:'vertical'
    },
    initialize: function () {
        this.callParent(arguments);
        var topToolbar = {
            xtype: "toolbar",
            docked: "top",
            title: "Details"
        };
        this.add([
                  topToolbar,
                  { xtype: "fieldset",
                      items: [{
                          xtype: 'textfield',
                          store: 'Details',
                          value : 'Name',
                          label: 'Name'
                      },
                      {
                          xtype: 'emailfield',
                          store: 'Details',
                          value : 'BillingStreet',
                          label: 'Email'
                      },
                      {
                          xtype: 'passwordfield',
                          store: 'Details',
                          value : 'BillingCity',
                          label: 'Password'
                      }
                      ]
                  }
              ]);
    }
});
コントローラ
Ext.define('App.controller.Main', {
    extend: 'Ext.app.Controller',
       config: {
        refs: {
            // We're going to lookup our views by xtype.
            contactlist: "contactlist",
            contactdetail: "listDetail",
            //f_name:"#f_name"
        },
        control: {
            contactlist: {
                // The commands fired by the notes list container.
                itemtap: "oneditLeadCommand"
            }
        },
        routes: {
            'contactlist': 'activateList'
        }
    },
    activateList: function ()
    {
        Ext.Viewport.animateActiveItem(this.getContactlist(), this.slideRightTransition);
    },
    slideLeftTransition: { type: 'slide', direction: 'left' },
    slideRightTransition: { type: 'slide', direction: 'right' },
    oneditLeadCommand: function (list, index, target, record, e, eOpts)
    {
        console.log("onEditLead"+record.data.Id);
        this.activateLeadDetail(record);
    },
    activateLeadDetail: function (record)
    {
      var contactDetail = this.getContactdetail();
      //console.log("activateLeadDetail"+contactDetail.textfield);
      //contactDetail.setRecord(record); // load() is deprecated.
      //this.getF_name().setDisplayField("");
      store = Ext.StoreMgr.get('Details');
      //console.log("activateLeadDetail"+store);
      store.setProxy({
        type: 'ajax',
        url : 'http://10.0.2.2:8080/SalesForce/leads/get-lead-details/00D90000000jvoU!AR4AQB6Xcjz4UNBKf12WOcYHWc31QxK2.fXTcbCvOq.oBosCrjBezhqm8Nqc1hrf8MKK5LjLAu8ZC5IqB1kdpWvJGLdWd5pJ/'+record.data.Id,  //  the json file that holds all our contact info.
        reader: {
            type: 'json'
           }
       });
      store.load();
      var record1 = Ext.StoreMgr.get('Details').getAt(0);
      console.log("activateLeadDetail"+record1);
      Ext.StoreMgr.get('Details').each(function(test){
            console.log("for loop"+test.data);
        });
      contactDetail.setRecord(record1);
      Ext.Viewport.animateActiveItem(contactDetail, this.slideLeftTransition);
   },
    // Base Class functions.
    launch: function () {
        this.callParent(arguments);
        console.log("launch");
    },
    init: function () {
        this.callParent(arguments);
        console.log("init");
    }
})
データを詳細ビューにバインドするのを手伝ってください。