当前位置: 代码迷 >> JavaScript >> Extjs4-Uncaught TypeError: Cannot read property ‘items’ of undefined
  详细解决方案

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

热度:1258   发布时间:2012-09-27 11:11:17.0
Extjs4---Uncaught TypeError: Cannot read property ‘items’ of undefined

在做

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


  相关解决方案