当前位置: 代码迷 >> JavaScript >> ExtJs Store baseParams设立
  详细解决方案

ExtJs Store baseParams设立

热度:534   发布时间:2012-09-22 21:54:54.0
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的设置,注意位置,调了半天原来放在下面就会出错
  相关解决方案