extraParams ,

extraParams:将在每次请求中包含的额外参数。个别请求中具有相同名称的参数, 当它们冲突时,这些参数会进行重写。

extraParams:{eParam:'foo'}

get提交 filter范围内,与extraParams无关

 store.setFilters({
      "operator": "eq",
      "value":‘some’
      "property": 'eParam'
}
)

 

 

store.load({
    params: {start: 0, limit: 20,eParam:'bar'},    //参数 post提交,load当前执行一次不保存该状态;本次load替换eParam(extraParams)指定的参数为bar,
    // callback是加载完毕时执行的回调函数,它包含3个参数:records参数表示获得的数据,options表示执行load()时传递的参数,success表示是否加载成功。
    callback: function (records, options, success) {
        Ext.Msg.alert('info', '加载完毕');
    },
    scope: store, //Scope用来指定回调函数执行时的作用域
    //Add为true时,load()得到的数据会添加在原来的store数据的末尾,
    //否则会先清除之前的数据,再将得到的数据添加到store中
    add: true
});

 

posted on 2018-03-27 15:08  xsSystem  阅读(520)  评论(0编辑  收藏  举报