extjs pagetoolbar动态绑定参数

来源:互联网 发布:centos安装wget命令 编辑:程序博客网 时间:2024/05/20 09:45

  今天项目中遇到这么一个问题,我有上下两个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}}});


原创粉丝点击