title: Ext.data.LocalStorage not working on Offline Mode
body: <p>Im now studying Sencha Touch 2 and doing some Research on Ext.data.LocalStorage that can be use in Offline Mode.</p>
  
  <p>I tried to follow this  turorial
  <a href="http://www.robertkehoe.com/2012/11/sencha-touch-2-localstorage-example/" rel="nofollow">Sencha Touch 2 Local Storage</a>
  and just updated the code from  <a href="https://github.com/RobK/SenchaTouch2-LocalStorageExample" rel="nofollow">Github - RobK/SenchaTouch2-LocalStorageExample</a> or <a href="https://github.com/riyaadmiller/LocalStorage" rel="nofollow">riyaadmiller/LocalStorage</a> and modified Store url using my own WCF Rest
  but i cant get LocalStorage working on offline mode.I have no issue on running the app Online. I also tried to debug it on Chrome developer tool but LocalStorage always get 0 data. I used Chrome/Safari Browser and also build the apps as Android using Phonegap build and still not working. </p>
  
  <p>Did I miss something?
  Does anyone can provide the details to deal with this Issue.</p>
  
  <p>Below is my code:</p>
  
  <p>Store:</p>
  
  <pre><code>Ext.define('Local.store.News', {
    extend:'Ext.data.Store',
  
  
    config:{
        model: 'Local.model.Online',
      proxy:
          {
              type: 'ajax',
              extraParams: { //set your parameters here
                  LookupType: "Phone",
                  LookupName: ""
              },
              url: 'MY WCF REST URL',
              headers: {
                  'Content-Type': 'application/json; charset=utf-8'
              },
              reader:
              {
                  type: 'json'
                  , totalProperty: "total"
              },
              writer: {   //Use to pass your parameters to WCF
                  encodeRequest: true,
                  type: 'json'
              }
          },
      autoLoad: true
    }
  });
  </code></pre>
  
  <p>Offline Model:</p>
  
  <pre><code>Ext.define('Local.model.Offline', {
    extend: 'Ext.data.Model',
    config: {
        idProperty: "ID", //erm, primary key
        fields: [
            { name: "ID", type: "integer" }, //need an id field else model.phantom won't work correctly
            { name: "LookupName", type: "string" },
            { name: "LookupDescription", type: "string" }
        ],
      identifier:'uuid', // IMPORTANT, needed to avoid console warnings!
      proxy: {
        type: 'localstorage',
        id  : 'news'
      }
    }
  });
  </code></pre>
  
  <p>Online Model:</p>
  
  <pre><code>Ext.define('Local.model.Online', {
    extend: 'Ext.data.Model',
    config: {
         idProperty: "ID", //erm, primary key
        fields: [
            { name: "ID", type: "integer" }, //need an id field else model.phantom won't work correctly
            { name: "Name", type: "string" },
            { name: "Description", type: "string" }
        ]
    }
  });
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>Ext.define('Local.controller.Core', {
    extend : 'Ext.app.Controller',
  
    config : {
      refs    : {
        newsList   : '#newsList'
      }
    },
  
    /**
     * Sencha Touch always calls this function as part of the bootstrap process
     */
    init : function () {
      var onlineStore = Ext.getStore('News'),
        localStore = Ext.create('Ext.data.Store', { storeid: "LocalNews",
        model: "Local.model.Offline"
        }),
        me = this;
  
      localStore.load();
  
      /*
       * When app is online, store all the records to HTML5 local storage.
       * This will be used as a fallback if app is offline more
       */
      onlineStore.on('refresh', function (store, records) {
  
        // Get rid of old records, so store can be repopulated with latest details
        localStore.getProxy().clear();
  
        store.each(function(record) {
  
          var rec = {
            name : record.data.name + ' (from localStorage)' // in a real app you would not update a real field like this!
          };
  
          localStore.add(rec);
          localStore.sync();
        });
  
      });
  
      /*
       * If app is offline a Proxy exception will be thrown. If that happens then use
       * the fallback / local stoage store instead
       */
      onlineStore.getProxy().on('exception', function () {
        me.getNewsList().setStore(localStore); //rebind the view to the local store
        localStore.load(); // This causes the "loading" mask to disappear
        Ext.Msg.alert('Notice', 'You are in offline mode', Ext.emptyFn); //alert the user that they are in offline mode
      });
  
    }
  });
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>Ext.define('Local.view.Main', {
    extend : 'Ext.List',
  
    config : {
      id               : 'newsList',
      store            : 'News',
      disableSelection : false,
      itemTpl          : Ext.create('Ext.XTemplate',
        '{Name}-{Description}'
      ),
      items            : {
        docked : 'top',
        xtype  : 'titlebar',
        title  : 'Local Storage List'
      }
    }
  });
  </code></pre>
  
  <p>Thanks and Regards</p>