Wednesday, 28 August 2013

load Data from local store

load Data from local store

I'm facing some diffculties loading specific data records frome local
store into app's views.
The store looks like this:
Ext.define('xyz.store.UserDataStore', { extend: 'Ext.data.Store',
requires: [ 'xyz.model.user' ],
config: {
autoLoad: true,
autoSync: true,
model: 'xyz.model.user',
storeId: 'myStore',
proxy: { type: 'localstorage', id: 'id' } } });
The model looks like this:
Ext.define('xyz.model.user', { extend: 'Ext.data.Model',
config: { fields: [ { name: 'token', type: 'string' }, { name: 'title' },
{ name: 'login' }, { name: 'facebookId' }, { name: 'firstName', type:
'string' }, { name: 'lastName', type: 'string' }, { name: 'nationality',
type: 'string' }, { name: 'birthDay', type: 'string' }, { name: 'phone' },
{ name: 'mobile' }, { name: 'street' }, { name: 'city', type: 'string' },
{ name: 'zipCode', type: 'int' }, { name: 'willingToTravel' }, { name:
'pictureUrl' }, { name: 'eMail' }, { name: 'publicList' } ] } });
Thank you in advance, Sabine

No comments:

Post a Comment