JamesGC 2010-10-09 16:12
浏览 218
已采纳

Ext Paging Grid 提示 缺少';'

[code="java"]
Ext.onReady(function(){

var store = new Ext.data.JsonStore({
    root: 'topics',
    totalProperty: 'totalCount',
    idProperty: 'autoID',
    remoteSort: false,
    fields:[
            'formOrder',
            'formLabel',
            'formName',
            'isView',
            'viewForm',
            'autoID'
            ],
    proxy: new Ext.data.ScriptTagProxy({
        url: 'asp/loadFormList.asp'
    })
});
//store.setDefaultSort('formOrder', 'asc');

function renderForm(value, p, record){
    return String.format(
        '<a href="{0}">查看</a>',
        value
    );
}

var grid = new Ext.grid.GridPanel({
    width:700,
    height:500,
    title:'FormList',
    store: store,
    disableSelection:true,
    loadMask: true,
    stripeRows: true,

    columns:[{
        id: 'formOrder',
        header: "排序",
        dataIndex: 'formOrder',
        width: 70,
        sortable: true
    },{
        header: "表单名",
        dataIndex: 'formLabel',
        width: 150,
        sortable: true
    },{
        header: "数据表",
        dataIndex: 'formName',
        width: 150,
        align: 'right',
        sortable: true
    },{
        header: "是否虚拟表",
        dataIndex: 'isView',
        width: 100,
        sortable: true
    },{
        header: "真实表",
        dataIndex: 'viewForm',
        width: 150,
        sortable: true
    },{
        header: "查看",
        dataIndex: 'autoID',
        width: 70,
        renderer: renderForm,
        sortable: true
    }],

    bbar: new Ext.PagingToolbar({
        pageSize: 25,
        store: store,
        displayInfo: true,
        displayMsg: 'Displaying topics {0} - {1} of {2}',
        emptyMsg: "No topics to display"
    })
});

grid.render('formList');

store.load({params:{start:0, limit:25}});

});

loadFormList.asp 输出的是 {'totalCount':'1','topics':[{'formOrder':'1','formLabel':'测试','formName':'test','isView':'False','viewForm':'','autoID':'1'}]}
[/code]

  • 写回答

1条回答

  • lizhiyezi 2010-10-11 09:32
    关注

    proxy: new Ext.data.ScriptTagProxy({

    url: 'asp/loadFormList.asp'

    })

    直接使用url就行了
    url: 'asp/loadFormList.asp'

    ScriptTagProxy 是请求可执行的javascript脚本资源

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog