日期:2014-05-16 浏览次数:20427 次
The MVC Application Architecture(地址:http://www.sencha.com/learn/the-mvc-application-architecture/)时遇到了一个错误:
"Uncaught TypeError: Cannot read property ‘items’ of undefined"
找了很久才发现是因为没有在List.js中配置colums
完整代码下载:http://download.csdn.net/detail/lc448986375/4587647
需要添加colums的代码:
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'} ] } );