1、
报错:
this.onMetaChange is undefined
http://localhost:8080/ExtStudy/extjs/ext-all.js
Line 10451
原因:
var ds = Ext.data.Store({
proxy:new Ext.data.ScriptTagProxy({
url:'http://extjs.com/forum/topics-remote.php'
}),
reader:new Ext.data.JsonReader({
root:'topics',
totalProperty:'totalCount',
id:'post_id'
},[
{name:'postId',mapping:'post_id'},
{name:'title',mapping:'topic_title'},
{name:'topicId',mapping:'topic_id'},
{name:'author',mapping:'author'},
{name:'lastPost',mapping:'post_time',type:'date',dateFormat:'timestamp'}, //"post_time":"1267062772"
{name:'excerpt',mapping:'post_text'}
]),
baseParams:{limit:20,forumId:4}
});
中 var ds = Ext.data.Store({这行代码少了一个"new" ,修改为:
var ds = new Ext.data.Store({
this.onMetaChange is undefined
ExtJS数据存储配置错误修正
最新推荐文章于 2024-02-28 10:41:01 发布
本文介绍了一种常见的ExtJS应用开发中的错误——数据存储配置时遗漏了new关键字,导致JavaScript运行时报错。通过一个具体示例,详细解释了如何定位问题并修复,确保应用程序能够正常加载和显示数据。
1881

被折叠的 条评论
为什么被折叠?



