pager1

Ext.define('JobinstanceBean', {
                extend: 'Ext.data.Model',
                fields: [
                {name: 'jobInstanceId', type: 'int'},
                {name: 'internalId', type: 'int'},
                    {name: 'jobName', type: 'string'},
                    {name: 'status',  type: 'string'},
                    {name: 'jobProgress',  type: 'string'},
                    {name: 'jobPriority',  type: 'string'},
                    {name: 'submitTime',  type: 'date'},
                    {name: 'startTime',  type: 'date'},
                    {name: 'endTime',  type: 'date'},
                    {name: 'jobTaskTotalCount',  type: 'string'},
                    {name: 'jobRuningTaskCount',  type: 'string'},
                    {name: 'jobPendingTaskCount',  type: 'string'},
                    {name: 'jobFinishedTaskCount',  type: 'string'},
                    {name: 'ostype',  type: 'string'},
                    {name: 'jobExeDuration',  type: 'string'}
                ]
            });
   
    var pageSize = 10;
   
    var myStore = Ext.create('Ext.data.Store', {
    //分页大小
    pageSize: pageSize,
    autoLoad: false,
    model: 'JobinstanceBean',
    proxy: {
        type: 'ajax',
        url: 'cm!jobManagerList.action',
        reader: {
type:'json',
root: 'list',
        totalProperty: 'allRow'
        }
    }
});

// 必须通过此方式传递参数
myStore.on('beforeload', function (store, options) {
        Ext.apply(store.proxy.extraParams);
    });

myStore.load({
// start以及limit是关键字,不能重命名
      params: { start: 0, limit: pageSize }
   });

你可能感兴趣的:(pager1)