Javascript 网格面板中的ExtJs 5.1分页工具栏

Javascript 网格面板中的ExtJs 5.1分页工具栏,javascript,extjs,datagridview,extjs5,Javascript,Extjs,Datagridview,Extjs5,使用ExtJS5.1,当我加载网格面板时,它会在分页工具中显示正确的分页编号。但在页面加载期间,它始终显示第1页(共5页)。“上一步”和“下一步”按钮被禁用 var store = new Ext.data.Store({ autoLoad: {params:{start: 0, limit: 5}}, pageSize: 5, remoteSort: true, model: 'TenantDetails', proxy: { typ

使用ExtJS5.1,当我加载网格面板时,它会在分页工具中显示正确的分页编号。但在页面加载期间,它始终显示第1页(共5页)。“上一步”和“下一步”按钮被禁用

var store = new Ext.data.Store({

    autoLoad: {params:{start: 0, limit: 5}},
    pageSize: 5,
    remoteSort: true, 
    model: 'TenantDetails',
    proxy: {
        type: 'ajax',
        enablePaging : true, 
        url: 'http://localhost:8080/restcountries-dev/rest/page/v0.5/tenant', 
        reader:  new Ext.data.JsonReader({
            type: 'json' ,              
            totalProperty:15,
            rootProperty:'tenant'
        })
    },
    listeners:{      
        load:function(store){            
            Ext.getCmp('tenant_detail_grid').getSelectionModel().select(0, true);            
        }     
   }
});
#

#

分页工具栏的定义如下

bbar: #


不知道我到底遗漏了什么。谢谢你的代码看起来正确。下面是我的分页的一个工作示例

initComponent: function () {
    var me = this;

    me.store = Ext.create('Desktop.children.store.childrenStore');

    me.columns = [
        {
            text     : 'Nachname',
            dataIndex: 'lastName',
            flex: 1
        },
        {
            text     : 'Vorname',
            dataIndex: 'firstName',
            flex: 1
        },
        {
            text     : 'Gruppe',
            //name: 'group_id',
            dataIndex: 'groupName',
            flex: 1
        },
        {
            text     : 'Faktor',
            //name: 'group_id',
            dataIndex: 'factorName',
            flex: 1
        },
        {   
            xtype: 'datecolumn',
            text     : 'Geburtsdatum',
            dataIndex: 'birthdate',
            format: 'd.m.Y',
            flex: 1
        },
        {
            text     : 'Status',
            //name: 'group_id',
            dataIndex: 'isActive',
            flex: 1
        },
        {
                xtype: 'actioncolumn',
                width: 60,
                menuDisabled: true,
                items: this.LoadControlBar()
            }
    ];

    me.plugins = [{
        ptype:'saki-gridsearch'
        ,searchText: 'Suchen'
        ,autoTipText: 'Mindestens zwei Zeichen'
        ,selectAllText: 'Selektiere alle'
    }];

    me.bbar = me.paging = Ext.create('Ext.toolbar.Paging', {
         store:me.store
        ,displayInfo:true

    });


    me.tbar = [
        {
            xtype: 'button',
            id:'child_btn_add',
            text:'Kind hinzufügen',
            tooltip:'Neues Kind hinzufügen',
            iconCls:'add',
            hidden: (CheckPermission('Desktop.children.view.Mainwindow') != "WRITE"),
            handler:function(view, e){
                this.fireEvent('AddChildren', view, e);
            }
        },
        {
            xtype: 'button',
            id: 'btnChildExport',
            text: 'Liste exportieren',
            tooltip: 'Spezifische Liste exportieren',
            iconCls: 'exportList',
            handler: function(view, e){
                this.fireEvent('ExportList', view, e);
            }
        }
    ];

    me.callParent();
},
商店:

Ext.define('Desktop.children.store.childrenStore', {
extend: 'Ext.data.Store',
id: 'childrenStore',
alias: 'widget.childrenStore',

requires: [
    'Desktop.children.model.childrenModel',
    'Ext.data.proxy.Memory',
    'Ext.data.reader.Array'
],


model: 'Desktop.children.model.childrenModel',
//autoLoad:true,
pageSize: 10,
proxy:
{
    type:'ajax',
    enablePaging: true,
    url:'resources/php/json.php',
    headers: { 'Content-Type': 'application/json' },
    extraParams:{
        data : JSON.stringify({
            module : "children",
            action : "load",
            jsonObject : null}),
        start: 0,
        limit: 10,
    },
    reader:{
        type:'json',
        rootProperty: 'Anfang'
    }
},

sorters: [{
        property : 'lastName',
        direction:'ASC'
}],
});

您在上面的代码中使用了哪个版本的ExtJS?你知道ExtJS5中分页工具栏的bug吗?它是5.1版本,工作正常。您的JSON请求看起来如何?{“租户”:[{“addressLine1”:“BLR”,“addressLine2”:“KAR”,“city”:“KSLayout”,“country”:“India”,“email”:c@c.com“,”id:”10“,”orgName:”KSRTC“,”主要联系人“:”1111111“,”州“:”卡纳塔克邦“,”电信号“:”0801111“,”蒂诺“:”蒂诺“,”蒂诺“,”,,”,“,”地址线1“,”BLR“,”地址线2“:”卡尔“,”城市“:”KSLayout“,”国家“,”印度“,”电子邮件“:"c@c.com“,”id:”19“,”orgName:”APSRCT10“,”primaryContact:”1111111“,”state:”卡纳塔克邦“,”telNo:”0801111“,”tinNo:”Tin002“,”zip:”11111“}…”
Ext.define('Desktop.children.store.childrenStore', {
extend: 'Ext.data.Store',
id: 'childrenStore',
alias: 'widget.childrenStore',

requires: [
    'Desktop.children.model.childrenModel',
    'Ext.data.proxy.Memory',
    'Ext.data.reader.Array'
],


model: 'Desktop.children.model.childrenModel',
//autoLoad:true,
pageSize: 10,
proxy:
{
    type:'ajax',
    enablePaging: true,
    url:'resources/php/json.php',
    headers: { 'Content-Type': 'application/json' },
    extraParams:{
        data : JSON.stringify({
            module : "children",
            action : "load",
            jsonObject : null}),
        start: 0,
        limit: 10,
    },
    reader:{
        type:'json',
        rootProperty: 'Anfang'
    }
},

sorters: [{
        property : 'lastName',
        direction:'ASC'
}],
});