0

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']
         }
   }); 

这是我在列表中的视图、存储和模型,但在运行时出现以下错误,但程序在单击包含列表的选项卡时正在运行,它显示错误。正在显示列表但未显示数据。请帮助我

Uncaught TypeError: Object # has no method 'setVisible'..为什么这个错误出现在我的列表中?

4

0 回答 0