list - Specified store not found sencha touch -


i using mvc architecture load data list, , displaying on screen. upon running app following error

[warn][test.view.list#applystore] specified store cannot found

i tried following instructions given here, gave me error:

file not found @ null/view/list.js null/store/list1store.js null/model/list1modeljs

the root directory of application "test".

list model file:

ext.define('test.model.list1model', { extend: 'ext.data.model', config: {     fields: [         {name: 'firstname', type: 'string'},         {name: 'lastname',  type: 'string'},         {name: 'age',       type: 'int'},         {name: 'eyecolor',  type: 'string'}         ]     } }); 

list store file:

ext.define("test.store.list1store", { extend:'ext.data.store', requires:['test.model.list1model'], config:{   model: "test.store.list1model", data : [     {firstname: "ed",    lastname: "spencer"},     {firstname: "tommy", lastname: "maintz"},     {firstname: "aaron", lastname: "conran"},     {firstname: "jamie", lastname: "avins"} ] } }); 

list view file:

ext.define("test.view.list", { extend:'ext.list', requires:['test.store.list1store'], config:{fullscreen: true, store: 'test.store.list1store', itemtpl: "{lastname}, {firstname}" } }); 

app.js:

ext.application({ requires: [ 'ext.dataview.list', 'ext.panel',  'ext.spacer',   'test.view.list',   'ext.list',   'test.model.list1model',   'test.store.list1store' ], launch : function(){     list1 =ext.create('test.view.list');     ext.create('ext.container',{       id:'contain',        fullscreen:true,       items:[     list1,       ]     })   } }); 

you defined store, did not instantiate it. try following:

ext.define("test.view.list", {     extend:'ext.list',     requires:['test.store.list1store'],     fullscreen: true,      constructor : function() {         this.callparent();         this.setstore(ext.create("test.store.list1store"));     },      config: {         fullscreen: true,         itemtpl: "{lastname}, {firstname}"     }  }); 

ps: correct model in store this: model: "test.model.list1model"


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -