Ext页面根据查询条件 得出的List数据在action已经得到了 怎么在GridPanel中重新加载一次呢?Ext.getCmp('Ext.system.logFormPanel').form.submit({
url : BASE_PATH + '/system/QueryLogByCond.action',
waitTitle : '提示',
method : 'POST',
waitMsg : '正在提交数据,请稍候.....',
success : function(form, action) {
logGridPanel.store.proxy
// 刷新表格
logGridPanel.store.reload({ params : { start : 0, limit : 15} });
},
failure : function(form, action) {
Ext.Msg.alert("提示", "返回数据出错!");
},
scope : this
});

解决方案 »

  1.   

    logGridPanel.store.reload({ params : {    start : 0,    limit : 15}    });
    这不是就行了么
      

  2.   

     行的话 我就不发帖了
    logGridPanel在页面打开的时候  就有数据 然后我输入查询条件 会查询出新的数据List, 条件查询的请求就是帖出来的代码,debug跟踪action最终得到了数据 怎么把数据加载到logGridPanel 呢? 求详细的代码~
      

  3.   

    汗~~ 你重新构造store不就完了
    不好意思 开始没看清~~
    类似代码: search : function() {
      
     var searchParam = this.getSearchParam();
      this.searchGrid.store.proxy = new Ext.data.HttpProxy({
    url:'<c:url value="whitelistManager/queryWhitelist.html"/>'
    });
      this.searchGrid.store.reload({params:searchParam});
      },
      

  4.   

    我这里试图改成 logGridPanel.store.proxy = new Ext.Ext.data.HttpProxy({}) 类似的 就是报错呢search = function(){
    if (!Ext.getCmp('Ext.system.logFormPanel').form.isValid()) {
    Ext.MessageBox.alert('提示', '请将数据填写完整');
    return;
        }
    Ext.getCmp('Ext.system.logFormPanel').form.submit({
    url : BASE_PATH + '/system/QueryLogByCond.action',
    waitTitle : '提示',
    method : 'POST',
    waitMsg : '正在提交数据,请稍候.....',
    success : function(form, action) {

    // 刷新表格
    logGridPanel.store.reload({ params : { start : 0, limit : 15} });
    },
    failure : function(form, action) {
    Ext.Msg.alert("提示", "返回数据出错!");
    },
    scope : this
    });
    }
      

  5.   

    首先查询一般是不需要验证数据完整性的 而且你这里可以尝试不用submit我把我的查询的构造查询参数的方法也贴给你
      getSearchParam : function() {
          var searchForm = this.searchForm.getForm();
           var search_wlMobile = searchForm.findField('wlMobile').getValue()
           var search_gname = searchForm.findField('fullname').getValue();
           var searchParam = { search_wlMobile : search_wlMobile , search_gname : search_gname, start: 0, limit: 15};
           return searchParam;
         },
      

  6.   

    建议是用dwr
    而且simleStore,memoryProxy,ArrayReader是不支持分页的
    取得数据后直接
    store.load({params:{start:0, limit:pageSize },callback :function(){}});
      

  7.   


    楼主已经用了ext 那是没办法的事了 用了ext 已经注定了 悲剧~~ 
      

  8.   

    我是说ext+dwr
    不习惯楼主那段代码中使用ext的form进行提交
      

  9.   

    代码是这样的var logFormPanel = new Ext.form.FormPanel({
    id : 'Ext.system.logFormPanel',
    frame: true,
    border: true,
    bodyStyle: "padding:0 0", 
    autoScroll: true,
    layout: "column",
    items: [{
    columnWidth: .3,
    layout: 'form',
    labelAlign: "right",
    defaultType: 'textfield',
    items: [ startTime ]
    },{
    columnWidth: .3,
    labelAlign: "right",
    layout: 'form',
    defaultType: 'textfield',
    items: [ endTime ]
    },{
    columnWidth: .3,
    layout: 'form',
    labelAlign: "right",
    defaultType: 'textfield',
    items: [ keyWord ]
    },{
      xtype:"button",
      columnWidth: .1,
        text: '查询',
        handler : function() {
      search();
    }
    }]
    });search = function(){
    Ext.getCmp('Ext.system.logFormPanel').form.submit({
    url : BASE_PATH + '/system/QueryLogInfo.action',
    waitTitle : '提示',
    method : 'POST',
    waitMsg : '正在提交数据,请稍候.....',
    success : function(form, action) {

    // 刷新表格
    logGridPanel.store.reload({ params : { start : 0, limit : 15} });
    },
    failure : function(form, action) {
    Ext.Msg.alert("提示", "返回数据出错!");
    },
    scope : this
    });
    }
      

  10.   

    如果你是把查询条件作为store的params,应该就用reload()就行,比如
    store.baseParams ={
    start:0,limit:50,  //这些是修改后的参数
    'surveyRange.id':grid.surveyRange,
    'borrowsBatchNo':borrowBatchNo,
    }; 
    store.reload();
    相当于你修改action中将要用到的参数
    比如第一次是1月份数据,查询时将1月份改成二月就会得到二月份的数据还有一种解决方法,如果数据已经返回了,用loadDate()解决
    var wrongstore = new Ext.data.JsonStore({  
                 fields : ["wrongType","wrongDescribe"],
                    data : []          
    }); Ext.Ajax.request( {
    url :Ext.base+'/survey!findwrongdetailbytaskid.action',
            params:{
             'taskid':taskid             
            },
    success : function(response, opts) {
    var obj = Ext.decode(response.responseText);
    wrongstore.loadData(obj.list);
    }    
    });
      

  11.   

    baseParams 里的参数,当你reload时会自动带上
    params     里的参数,只有当前请求能用到
      

  12.   

    // 日志信息列表
    var logRecord = Ext.data.Record.create([
    {name: 'moduleName', type: 'string'},
    {name: 'operationType', type: 'string'},
    {name: 'busiContent', type: 'string'},
    {name: 'operator', type: 'string'},
    {name: 'doTime', type: 'datetime'},
    {name: 'ipAddress', type: 'string'}
    ]);

    this.proxy = new Ext.data.HttpProxy({
        url : "/SLaw/system/QueryLogInfo.action"
    })

    var store = new Ext.data.Store({
    proxy: this.proxy,
    remoteSort:true,
    reader: new Ext.data.JsonReader({
    totalProperty: 'totalCount',
    root: 'logInfoList'
    },logRecord)
    });
    store.load({params:{start:0, limit:15}});
    search = function(){
    Ext.getCmp('Ext.system.logFormPanel').form.submit({
    url : BASE_PATH + '/system/QueryLogInfo.action',
    params:{
    'start':0,
    'limit':15
    },
    waitTitle : '提示',
    method : 'POST',
    waitMsg : '正在提交数据,请稍候.....',
    success : function(form, action) {
    // var result = Ext.decode(action.result);
    //         store.loadData(result);
    var obj = Ext.decode(response.responseText);
    store.loadData(obj.list); // 刷新表格
    // logGridPanel.store.reload({ params : { start : 0, limit : 15} });
    },
    failure : function(form, action) {
    Ext.Msg.alert("提示", "返回数据出错!");
    },
    scope : this
    });
    }
    这样写不行 ,问题在哪里了?
      

  13.   

     this.searchGrid.store.proxy = new Ext.data.HttpProxy
               
     this.searchGrid.store.reload({params:searchParam});都说了 要先重新构造store.proxy 然后reload 你的写法我改不了 无能为力了
      

  14.   

    吼吼 这样解决了
    store.load({ params: Ext.apply({ start: 0, limit: 15 }, Ext.getCmp("Ext.system.logFormPanel").form.getValues()) });