【发布时间】:2012-05-29 20:07:11
【问题描述】:
我的应用程序中有一个网格配置为xtype : 'pagingtoolbar',与此网格相关的存储配置为pageSize : 10,结果是pagingtoolbar 正确显示(如下所示)但我有网格中的滚动条,所有记录都加载到网格中。我肯定在网格/存储配置中缺少某些东西:
网格:
xtype : 'gridpanel',
store : mystore,
height : 350,
hidden : true,
columns : [ {
dataIndex : 'firstName',
text : 'First Name',
flex : 1
},{
dataIndex : 'lastName',
text : 'Last Name',
flex : 1
},{
dataIndex : 'email',
text : 'Email',
flex : 1
}],
dockedItems : [ {
xtype : 'pagingtoolbar',
hight : 28,
displayInfo : true,
dock : 'bottom'
} ]
商店:
Ext.define('Users',{
extend: 'Ext.data.Store',
model: usersModel,
pageSize : 10,
proxy: {
type: 'ajax',
url: 'servletURL',
reader: {
type: 'json',
root: 'data',
successProperty: 'success',
totalProperty: 'total'
},
writer: {
type : 'json',
root: 'data'
},
actionMethods: {
read : 'POST',
create : 'POST',
update : 'POST',
destroy: 'POST'
},
},
sortOnLoad: true,
sorters: { property: 'dateTimeTrx', direction : 'DESC' },
});
我从服务器端正确接收数据,但我无法显示页面,所有数据都在一页中,即使pagingtoolbar 正确显示如上所示,有什么帮助吗?谢谢!
【问题讨论】: