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