title: ExtJs Grid Auto Refresh using REST Proxy
body: <p>I have tried to refresh the Grid every 5 or 10 seconds which is using REST Proxy, but the grid is not getting refreshed more than once. Please find the code which we have tried.</p>
  
  <pre><code>Ext.define('App.Store.DeviceStore', {
  extend: 'Ext.data.Store',
  requires: [
      'Ext.data.proxy.Ajax',
      'Ext.data.reader.Json'
  ],
  constructor: function(cfg) {
      var me = this;
      cfg = cfg || {};
      me.callParent([Ext.apply({
          storeId: 'app.store.DeviceStore',
          model: 'App.model.DeviceModel',
          activeRefreshTask:false,
          pageSize: 5,
          autoLoad: {
              pageSize: 5
          }
      }, cfg)]);
  },listeners:{
      'load':function(store,records,successful,operation){
          if(successful === true &amp;&amp; store.activeRefreshTask === false){
          var task = {
                  identifyId: 'deviceListStore',
                  run: function() {
                      if (App.app._currentPage == 'devicesform') {
                          store.reload();
                      } else {    
                          Ext.TaskManager.stop(this);
                      }
                  },
                  interval: '10000'
              }
              Ext.TaskManager.start(task);
              store.activeRefreshTask = true;
          }
      }
  }
  </code></pre>
  
  <p>});</p>
  
  <p>The model for the above store is </p>
  
  <pre><code>Ext.define('App.model.DeviceModel', {
  extend: 'Ext.data.Model',
  requires: [
      'Ext.data.field.String'
  ],
  proxy:{
          type:'rest',
          reader: {
              type: 'json',
              rootProperty: 'data',
              totalProperty:'total'
          },
          useDefaultXhrHeader: false,
          headers:{'Content-Type':'application/json'},
          api: {
              read: 'url given gere'
          }
  },
  
  fields: [
      {
          type: 'string',
          name: 'id'
      },
      {
          type: 'string',
          name: 'name'
      },
      {
          type: 'string',
          name: 'desc'
      }, 
      {
          type: 'string',
          name: 'ipAddr'
      }
  
  ]
  </code></pre>
  
  <p>});</p>