title: How to send data in sencha between 2 views
body: <p>im learning sencha and i could not do data transfer between two views. I have 2 views. first view has datalist. when datalist item clicked im opening another view. and i need to send the list item values  to second view. </p>
  
  <p>can anyone help me please?</p>
  
  <p>first view.</p>
  
  <pre><code>Ext.define('griddeneme.view.pnlAna', {
  extend: 'Ext.Panel',
  alias: 'widget.pnlana',
  
  requires: [
      'Ext.XTemplate'
  ],
  
  config: {
      layout: {
          type: 'vbox'
      },
      items: [
          {
              xtype: 'panel',
              flex: 1,
              style: 'background-color:#81BEF7',
              items: [
                  {
                      xtype: 'button',
                      docked: 'left',
                      height: 15,
                      itemId: 'mybutton1',
                      style: 'margin-Top',
                      ui: 'decline',
                      text: 'Çıkış'
                  }
              ]
          },
          {
              xtype: 'panel',
              flex: 9,
              layout: {
                  type: 'vbox'
              },
              items: [
                  {
                      xtype: 'list',
                      flex: 1,
                      itemId: 'mylist',
                      itemTpl: [
                          '&lt;div&gt;{ad} - {yazar}&lt;/div&gt;'
                      ],
                      store: 'strYazarlar'
                  }
              ]
          }
      ],
      listeners: [
          {
              fn: 'onMybutton1Tap',
              event: 'tap',
              delegate: '#mybutton1'
          },
          {
              fn: 'onMylistItemTap',
              event: 'itemtap',
              delegate: '#mylist'
          }
      ]
  },
  
  onMybutton1Tap: function(button, e, eOpts) {
  
      var pnlAna = Ext.create('griddeneme.view.pnlGiris');
  
  
  
      Ext.Viewport.setActiveItem(pnlAna);
  },
  
  onMylistItemTap: function(dataview, index, target, record, e, eOpts) {
      //alert(record.data.ad);
  
      var Details=Ext.create('griddeneme.view.pnlDetail');
          Details.setData(record);
  
      Ext.Viewport.setActiveItem(Details);
  }
  </code></pre>
  
  <p>});</p>
  
  <p>second view</p>
  
  <pre><code>Ext.define('griddeneme.view.pnlDetail', {
  extend: 'Ext.Panel',
  alias: 'widget.pnldetail',
  
  config: {
      layout: {
          type: 'vbox'
      },
      items: [
          {
              xtype: 'panel',
              flex: 1,
              style: 'background-color:#81BEF7',
              items: [
                  {
                      xtype: 'button',
                      docked: 'left',
                      height: 15,
                      ui: 'back',
                      text: 'Geri'
                  }
              ]
          },
          {
              xtype: 'panel',
              flex: 8,
              itemId: 'mypanel7',
              style: '',
              items: [
                  {
                      xtype: 'label',
                      html: 'Kitap Adı:',
                      id: '',
                      minWidth: 150,
                      style: 'color:green; float:left'
                  },
                  {
                      xtype: 'label',
                      html: 'f',
                      id: 'lblAd'
                  },
                  {
                      xtype: 'label',
                      html: 'Yazar:',
                      minWidth: 150,
                      style: 'float:left;color:green;'
                  },
                  {
                      xtype: 'label',
                      html: 'ggg',
                      id: 'lblKitap'
                  }
              ],
              listeners: [
                  {
                      fn: function(component, eOpts) {
                          alert(record.data.ad);
                      },
                      event: 'initialize'
                  }
              ]
          }
      ]
  }
  </code></pre>
  
  <p>});</p>