日期:2014-05-16  浏览次数:20363 次

Ext4.2:ScriptTagProxy到4.2中不可用了,求解
这段获取数据分页的代码到4.2中就不可用了,求大神指点该怎么改呢
<html>
<head>
<link rel="stylesheet" type="text/css" href="./ExtJS4/resources/css/ext-all.css" />
<script type="text/javascript" src="./ExtJS4/ext-all.js"></script>
<script type='text/javascript'>
 Ext.onReady(function(){   

   var proxy = new Ext.data.ScriptTagProxy({url:'http://127.0.0.1:9000/Test/GetInfo'});
   
   var reader = new Ext.data.JsonReader(
     {root:'Data',totalProperty :'TotolRecord'},
     [
       {name: 'id'},   
       {name: 'name'},   
       {name: 'descn'} 
     ]
   );
   
   var store = new Ext.data.Store(
     {
     proxy:proxy,
     reader:reader
     }
   );
   
    var grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
            {header:"id",dataIndex: 'id'},
            {header:"name",dataIndex: 'name'},
            {header:"descn", dataIndex: 'descn'}
        ],
        height:400,
        width:600,
        title:'产品信息',
        bbar: new Ext.PagingToolbar({
            pageSize: 25,
            store: store,
            displayInfo: true,
            displayMsg: '总记录数 {0} - {1} of {2}',
            emptyMsg: "没有记录"            
        })
    });

    grid.render('grid');
    store.load({params:{start:0,limit:25}});   
   
 });
</script>
</head>
<body>
<div id="grid" style="height:265px;"></div>
</body>
</html>


点击后一直在loadMask,而且控制台报出了如下错误
Uncaught TypeError: Cannot read property 'prototype' of undefined     ext-all.js:21

求解如何升级呢
------解决方案--------------------

        var reader = new Ext.data.JsonReader(
     { root: 'Data', totalProperty:&