Note that there are some explanatory texts on larger screens.

plurals
  1. POSencha touch2, data in localstore not getting into localstorage
    primarykey
    data
    text
    <p>Model:</p> <pre><code>Ext.define('SkSe.model.PlacesLocal',{ extend:'Ext.data.Model', config:{ fields:['id', 'name','icon','required_stamps', 'active_stamps','description', 'campaign_id', 'user_favorites' , 'live_action_number'], proxy: { type: 'localstorage', id : 'local-places-id' } } }); </code></pre> <p>Store:</p> <pre><code>Ext.define('SkSe.store.PlacesLocal', { extend:'Ext.data.Store', config: { storeId: 'PlacesLocal', model: "SkSe.model.PlacesLocal", sorters: 'name', grouper: { groupFn: function (item) { return item.get('name')[0]; } }, groupDir: 'DESC' } }); </code></pre> <p>Offline - Online Store sync:</p> <pre><code>Ext.define('SkSe.store.Places',{ extend:'Ext.data.Store', config:{ autoLoad:true, autoSync:true, model:'SkSe.model.Places', sorters: 'name', grouper: { groupFn: function (item) { return item.get('name')[0]; } }, groupDir: 'DESC', proxy:{ type:'ajax', url:'http://localhost/campaigns/', reader:{ type:'json', //name of array where the results are stored rootProperty:'results' } }, listeners: { load: function() { var PlacesLocal = Ext.data.StoreManager.lookup('PlacesLocal'); // Clear proxy from offline store if (navigator.onLine) { console.log("Hm"); // Loop through records and fill the offline store this.each(function(record) { PlacesLocal.add(record.data); }); // Sync the offline store PlacesLocal.sync(); } } } } }); </code></pre> <p>Apparently placesLocalstore does get the data, but for some reason it doesn't get stored in localstorage. </p> <p>Key local-places-id appears in localstorage but without any data.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload