Hi,
I have created a simple form having three textfiled. i want to store values of textfiled into localstorage and later fetch all the record on console. i am doing this because i am beginner of sencha touch . i able to save the records in store.Whenever i try to fetch all previous records from store it display null data.it display only current records.when i refresh web page all is data is flush but record is available with null values.i want to display previous data also .i count all the rows it display accurately but it does not display all values of records except current data.
here is code
listeners:
{

tap:function()
{
Ext.Msg.alert('record added successfully');
store = Ext.create('Ext.data.Store',
{
autoload:true,
model: 'LoginDemo.model.User',
proxy:
{
type:'localstorage',
id:'mylogin'
}

});
var n=Ext.getCmp('txtname').getValue();
var a=Ext.getCmp('txtadd').getValue();
var e=Ext.getCmp('txtemail').getValue();
//loads any existing Search data from localStorage
store.load();
var arr=[];
arr.push(n,a,e);
store.add(arr);
store.sync();
console.log("record added");
// code for display all the records on console
/*for(i=0;i<store.getAllCount;i++)
{
console.log(store.get(i));
}*/
store.each(function(rec)
{
console.log(rec);
});
}
}
here i output
record added Main.js:73

Class {modified: Object, raw: Object, stores: Array[1], internalId: "c6db63be-6f86-4ed9-beba-c99ab2935cb7", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "3c1e1be7-d8c6-4017-bce6-aa5879ee1da1", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "cd18c93d-a0e1-4e48-b844-a67a8c69a55e", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "b5c7b3bc-0169-4383-8030-40048bf0be2b", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "a4e2b201-f8fd-4089-8b11-c5b8c3475436", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "82863883-c637-4d07-9e57-672f2a4161bb", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "92b7f88e-8602-40e5-b7d9-41a6ecdf3ca7", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "26c51522-21ed-4438-8612-461c6afff4f4", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "f1229a9b-97a5-4208-b31e-0a13bb14062b", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "d716d6bc-eb82-41d2-8b2a-734a9497ce32", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "6663d031-a7d5-4339-891b-2117a55f3126", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "33063b2e-74ac-4366-8621-ef90063fa03f", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "1dda9ef5-9106-4e88-ab5f-fd4a3deb2974", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "5f71ca2c-e432-483b-8b6c-59df01220799", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "e8ab4502-ea7b-4f8c-aeac-fd8b0dbbd886", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "83cf5abe-0df7-4725-9994-8a929015e6a0", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "4c4b095a-f1e1-4bc0-9058-2731fde161b3", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "ed72e1b2-cec8-4ad3-a0c3-2d14fd8a6e57", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "cc7281c2-2259-47f0-abf4-3fd041aee42a", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "9dfc912c-3550-4acc-9362-ee2b1fa4c3bf", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "c57e3b78-52d7-4b41-93bd-9783511808d9", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "7e65fcfb-d5d5-426d-b783-73783650b26d", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "8c472f82-8201-4e37-b826-9e60e5aa6eb4", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "6971eb33-9f7b-4f55-b4fa-7303107b5b15", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "b72a504c-7363-44ec-b7db-611a9d40ac01", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "219404fa-bb21-44be-b7fd-cd76011ca39d", data: Object…}


Main.js:80

Class {modified: Object, raw: Object, stores: Array[1], internalId: "84d60d16-3abe-4638-a138-a5de9124a00e", data: Object…}


Main.js:80

Class {modified: Object, raw: "zx", stores: Array[1], data: Object, _data: Object…}


Main.js:80

Class {modified: Object, raw: "zx", stores: Array[1], data: Object, _data: Object…}


Main.js:80

Class {modified: Object, raw: "z", stores: Array[1], data: Object, _data: Object…}


Main.js:80
in output it display only current data.what should i do for it.