0
好吧,所以我一直在這一整天,無法弄清楚爲什麼網格加載所有記錄,而不是我在商店配置的pageSize:25限制。分頁工具欄呈現正確的頁面,但網格是自動加載所有記錄的內容。我想這是因爲我的控制器加載視圖的方式。我有我的.cfc服務器端處理設置正確使用paging_on,開始,限制,排序和目錄在我的論點。如果任何人都可以幫助我,這將不勝感激。extjs 4.1 pagingtoolbar顯示正確,但網格加載所有記錄
這裏是我的控制器:
onAccountActivityListAfterrender: function(pnl, eOpts) {
var store = this.getStore("AccountSessions");
store.load({
params : {
start : 0,
limit : 25
},
callback: function (recs, op, success) {
if (!success) {
Ext.Msg.alert("Error!", op.error[0].ERROR);
}
var grid = Ext.getCmp('pnl-accountactivity-list');
grid.getStore().add(store.getRange());
this.showApp(pnl);
},
scope: this
});
},
,這裏是我的商店:
Ext.define("EXAMPLE.store.AccountSessions", {
alias: "store.AccountSessions",
extend: "Ext.data.Store",
model: "EXAMPLE.model.AccountSession",
pageSize: 25,
proxy: {
api: {
create : undefined,
read : "ajax/account.cfc?method=account_sessions",
update : undefined,
destroy : undefined
},
extraParams: {
account_id: account
},
reader: {
messageProperty: "ERRORS",
root: "DATA",
successProperty: "SUCCESS",
totalProperty: "TOTAL",
type: "json"
},
type: "ajax"
}
});
請問,有沒有人可以幫助我解決這個問題? – user1967776