Extjs4---Uncaught TypeError: Cannot read property ‘items’ of undefined

来源:岁月联盟 编辑:exp 时间:2012-09-22
在做
The MVC Application Architecture 时遇到了一个错误:
"Uncaught TypeError: Cannot read property ‘items’ of undefined"
找了很久才发现是因为没有在List.js中配置colums
 需要添加colums的代码:
[javascript] 
Ext.define( 
    'AM.view.user.List', 
    { 
        extend:'Ext.grid.Panel', 
        alias:'widget.userlist', 
        title:'All Users', 
        store:'Users', 
        columns:[ 
                 {header:'Name',dataIndex:'name'}, 
                 {header:'Email',dataIndex:'email'} 
        ] 
    } 
);