今天項目中遇到這麼一個問題,我有上下兩個grid,每當點擊上面grid的record時,下面會動態刷新爲上方grid記錄的的詳細信息,但是因爲下面grid(稱爲B吧)的pagetoolbar的存在,每次點擊B的刷新,則就會講上面grid(稱爲A)的所有記錄的所有信息展示出來,在點擊B的刷新按鈕是,B的story的extraParams並不起作用。我就把要傳的參數直接綁定到了url上。
this.store = new Ext.data.JsonStore({
autoLoad : {start : 0 ,limit : basicConstant.LIMIT},
// pageSize : basicConstant.LIMIT,
remoteSort : true,
grid : this,
loadFlag : false,
proxy : {
type : 'ajax',
url : "xmgl/plan-schedule-manage!page.action",
extraParams : this._baseParam,
reader : {
type : 'json',
root : 'rows',
totalProperty : "totalCount"
}
},
model : 'PlanSchedule',
listeners : {
'beforeload' : {
fn : function(_s, _op, _e) {
if (!_s.loadFlag)
{
return _s.loadFlag;
}
// this._baseParam.parentGuid = this._grid.getSelectionModel()
// .getSelection()[0].get("guId");
this.store.proxy.url = 'xmgl/plan-schedule-manage!page.action?parentGuid='+this._grid.getSelectionModel()
.getSelection()[0].get("guId");
},
scope : this
}
}
});