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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章