FileGroupList.js |视图
Ext.define("TestSatham.view.FileGroupList",{
extend:"Ext.dataview.List",
requires:["TestSatham.store.FileGroupList"],
xtype:'list',
config:{
store:'TestSatham.store.FileGroupList',
itemTpl: ' {firstName} {lastName} ',
emptyText: '<div style="margin-top: 20px;text-align: center">No Items Available</div>',
width:'95%',
height:'98%',
style:'border:3px solid grey;border-radius:5px;margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;background-color:grey'
}
});
FileGroupList.js |商店
Ext.define('TestSatham.store.FileGroupList', {
extend:"Ext.data.Store",
config:{
id:'filegroupliststore',
model: "TestSatham.model.FileGroupList",
data: [
{ firstName: 'Tommy', lastName: 'Maintz' },
{ firstName: 'Rob', lastName: 'Dougan' },
{ firstName: 'Ed', lastName: 'Spencer' },
{ firstName: 'Jamie', lastName: 'Avins' },
{ firstName: 'Aaron', lastName: 'Conran' },
{ firstName: 'Dave', lastName: 'Kaneda' },
{ firstName: 'Jacky', lastName: 'Nguyen' },
{ firstName: 'Abraham', lastName: 'Elias' },
{ firstName: 'Jay', lastName: 'Robinson'},
{ firstName: 'Nigel', lastName: 'White' },
{ firstName: 'Don', lastName: 'Griffin' },
{ firstName: 'Nico', lastName: 'Ferrero' },
{ firstName: 'Jason', lastName: 'Johnston'}
]
}
});
FileGroupList.js |模型
Ext.define("TestSatham.model.FileGroupList",{
extend: 'Ext.data.Model',
config: {
fields: ['firstName', 'lastName']
}
});
这是我的视图,商店和模型在列表中,但在运行时遇到以下错误,但程序运行时单击包含列表的选项卡显示error.list正在显示但数据未显示。请帮助我
未捕获TypeError:对象#没有方法'setVisible'..为什么我的列表中会出现此错误?