【发布时间】:2014-08-08 21:05:15
【问题描述】:
我正在开发一个 ExtJS 4.2 项目,我想在其中使用分页工具栏来浏览图像。
当我打开窗口时,所有图像都是正确的,但是当我单击下一个按钮查看下一个图像时,结果为空。这是因为参数 ID 没有传递给后端系统。
我在其他线程中看到了像 baseParams 这样的选项,但它们不在文档中并且不起作用。
//My Store Class
Ext.define('App.store.Images', {
extend: 'Ext.data.Store',
model: 'App.model.Images',
autoLoad: false,
autoSync: false,
storeId: 'Images',
pageSize: 8,
proxy: {
type: 'ajax',
url: '/getImages',
reader: {
type: 'json',
root: 'images',
totalProperty: 'total'
}
}
});
// This code is execute when i open the Window
var imagesStore = Ext.StoreManager.get('Images');
imagesStore.on('load', buildContent);
imagesStore.load({
params: {
id: record.get('id'),
start: 0,
limit: 8
}
});
在哪里可以定义附加参数?
【问题讨论】:
标签: javascript extjs pagination