我现在需要做一个EXT grid分页
请问一下,我不用EXT的按钮,我自己在外面定义了一个按钮
按钮提交我怎么将查询参数传到后台,并能结合EXT希望能贴出代码,谢谢!

解决方案 »

  1.   

    buttons : [{
      text : '查询',
      handler : function() {
       if (queryform.getForm().isValid())
        queryform.getForm().submit      ({
           url : './system/info.action',
           params : {
            command : 'query',
            start : 0,
            limit : 10
           },
           watiMsg : '系统处理中',
           success : function(res, v) {}..参考
      

  2.   

    请问一下这些参数如果我不用action,我该怎么获取?
      

  3.   

    你的服务器端用什么实现? 譬如这样的 getParameter("xx")就可以呀~
      

  4.   

    我好象没这样的东西。。我用的DWR直接到service
      

  5.   

    这个你参考一下
    http://topic.csdn.net/u/20080116/04/579afdc1-2897-491f-94a6-6502bc430374.html
      

  6.   

    用DWR我会传。。但是就分页的那两个参数不知道如何去取
      

  7.   

    在action里设置一个total(总页数),ext里参数里设置一页多少行 var ds = new Ext.data.Store({
    autoLoad : false,
    proxy : new Ext.data.HttpProxy({
    url : 'news.action?url=http://news.163.com/special/00011K6L/rss_newstop.xml'
    }),// 调用的动作
    reader : new Ext.data.JsonReader({
    // 记录总数参数名:名称需要跟action中对应
    totalProperty : 'total',
    // 查询出来的list集合:名称需要跟action中对应
    root:'newsList',
    successProperty : 'success'
    }, [{
    name :'title',
    mapping : 'title',
    type : 'string'
    }, {
    name : 'url',
    mapping : 'url',
    type : 'string'
    }, {
    name : 'publishTime',
    mapping : 'publishTime',
    type : 'string'
    }
    ])
    });ds.load({
    // 加载数据
    params : {
    start : 0,
    limit : 20
    }
    });// 备注:limit必须和bbar中的pageSize相同