日期:2014-05-16  浏览次数:20483 次

ExtJs Store baseParams设置
ExtJs Store baseParams设置
var store = new Ext.data.Store({ 
             baseParams: { limit:25,query: '' },//注意位置  
             proxy: new Ext.data.HttpProxy( 
             { 
                 url: url 
             } 
             ), 
             reader: new Ext.data.JsonReader( 
             { 
                 totalProperty: "totalPorperty", root: "root", fields: fields 
             } 
             ) 
           }); 
var store = new Ext.data.Store({
              baseParams: { limit:25,query: '' },//注意位置
              proxy: new Ext.data.HttpProxy(
              {
                  url: url
              }
              ),
              reader: new Ext.data.JsonReader(
              {
                  totalProperty: "totalPorperty", root: "root", fields: fields
              }
              )
            });
GridPanel加了SearchField搜索框这个控件
SearchField默认只有start:0参数无limit,还有为了调用查询参数query,在store中加入了baseParams的设置,注意位置,调了半天原来放在下面就会出错