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个回答

proxy: new Ext.data.ScriptTagProxy({

url: 'asp/loadFormList.asp'

})

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

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

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!