从网格分页下一个按钮修改参数(查询)

发布于 2024-10-08 11:41:59 字数 642 浏览 0 评论 0原文

当我不想使用分页工具栏中的“下一页按钮”显示下一页时,我遇到了一些分页问题。

我正在使用表单搜索来显示网格中的数据,该网格发送“开始”和“限制”参数查询(更准确地说是我的搜索)。

listeners: {
    keyup: function(el,type){
        var searchQuery = el.getValue();      //Get the value from the textfield 
        store.load({
            params: {
                start: 0,
                limit: 5,
                query: searchQuery
            }
        });
    }
}

假设我正在搜索“Apple”,服务器端脚本的调用如下:

serverSideScript.jsp?query=Apple&start=0&limit=5

所以现在,问题是下一个按钮只发送 start &限制。我在哪里可以覆盖所有分页按钮使用的加载方法以添加我的个人参数。

预先感谢您的帮助。 雨落。

I'm having some paging issues when I wan't to display the next page with the "next button" from m paging toolbar.

I'm using a form search to display data in my grid, which send along "start" and "limit" params a query (my search more precisely).

listeners: {
    keyup: function(el,type){
        var searchQuery = el.getValue();      //Get the value from the textfield 
        store.load({
            params: {
                start: 0,
                limit: 5,
                query: searchQuery
            }
        });
    }
}

Let's say I was searching for "Apple", the server side script is called like this :

serverSideScript.jsp?query=Apple&start=0&limit=5

So now, the problem is that the next button only send start & limit. Where can I overwrite the load method used by all paging buttons in order to add my personal param.

Thanks in advance for your help.
TheRainFall.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何以畏孤独 2024-10-15 11:41:59

一种方法是使用存储的 beforeload 侦听器来获取任何所需的数据并将其添加到参数中

beforeload: function(store) {
  store.baseParams.query = getSearchQuery();
}

One way to do it is to use beforeload listener of the store to fetch any required data and add it to parameters

beforeload: function(store) {
  store.baseParams.query = getSearchQuery();
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文