title: Sencha Touch: how to Update data Store to list from controller
body: <p>am facing problem while updating list from controller. I have store, model and list to show Json data. am able to get data but could not able update the list. and if do the ajax call in my store am able to data with list but listners are not getting called. So i moved the code to controller. 
  here is my store:</p>
  
  <pre><code>Ext.define('MyApp.store.StoreList', {
      extend:'Ext.data.Store',
      requires:['MyApp.model.ModelList'],
      config:{
          model:'MyApp.model.ModelList',
          autoLoad:'true',
          storeId:'id_StoreList'
      }
  });
  </code></pre>
  
  <p>model:</p>
  
  <pre><code>Ext.define('MyApp.model.ModelList', {
      extend: 'Ext.data.Model',
      xtype:'modelList',
      config: {
          fields:['name']
  }
  });
  </code></pre>
  
  <p>controller</p>
  
  <pre><code>Ext.define('MyApp.controller.Main', {
  extend : 'Ext.app.Controller',
  requires : ['MyApp.view.MyList'],
  config : {
      refs : {
          loadbtn:'button[action=loadbtn]',
          dataList: '#id_listitems'
  
  
      },
      control : {
          "#dataList": {
              itemtap: 'onListItemTap'
          },
          loadbtn:{
              tap : 'handleloadbtn'
          }
  
      }
  
  },
  
  handleloadbtn: function(){
      console.log('loadbtn tapped');
      Ext.Viewport.setMasked({xtype:'loadmask',message:'loading...'});
      this.ajaxCall();
  },
  
  ajaxCall:function(){
      Ext.Ajax.request({
          method: 'POST',
          scope: this,
          extraParams: {
              Details: true
          },
  
          url:'http://localhost:9080/works',
          actionMethods: {
              create : 'POST',
              read   : 'POST', // by default GET
              update : 'POST',
              destroy: 'POST'
          },
          headers :{
              "Content-Type" :'application/xml',
              'Accept':'application/json'
          },
          reader:
          {
              type:'json'
          },
          success: function(response){
              console.log('success');
  
              // var list = Ext.getCmp('id_listitems')
              //var store = Ext.getStore('id_StoreList');
              var store = Ext.data.StoreManager.lookup('id_StoreList');
              this.getDataList().setStore(store);
             //Error : Uncaught ReferenceError: getDataList is not defined 
              console.log('test:',test);
              Ext.Viewport.setMasked(false);
          }
      })
  }
  </code></pre>
  
  <p>});</p>
  
  <p>list:</p>
  
  <pre><code>Ext.define('MyApp.view.MyList',{
      extend:'Ext.Panel',
      xtype:'myList',
      requires:['Ext.dataview.List'],
      config:{
          layout:'fit',
          styleHtmlContent:'true',
          styleHtmlCls:'showListCls',
          items:[
              {
                  docked:'top',
                  items:[
                      {
                          xtype:'button',
                          text:'Load',
                          ui:'Plain',
                          action:'loadbtn',
                          width:'180px',
                          height:'30px',
                          docked:'right',
                          margin : '5 15 5 0'
                      }
                  ]
              },
              {
                  xtype:'list',
                  id: 'id_listitems',
                  action:'list_Item_Action',
                  store:'StoreList',
                  itemTpl:['{name}'
                  ]
              }
          ]
      }
  });
  </code></pre>
  
  <p>Can any one please help me out in resolving this? Thanks.</p>