简体   繁体   English

GWT CELLTABLE寻呼机如何确定用户单击了哪个按钮?

[英]GWT CELLTABLE pager How to determine which button is clicked by user?

I am using celltable , GWT2.3.0 我正在使用celltable,GWT2.3.0

How to determine which button is clicked by user ? 如何确定用户单击了哪个按钮? Is there any way to find out NEXT,PREV,LAST & FIRST button clicked ? 有没有办法找出单击的下一个,上一个,最后一个和第一个按钮?

Any help or guidance in this matter would be appreciated 在这方面的任何帮助或指导将不胜感激

Well the easist way I see right now, is write your own Simple pager and overwrite the "lastPage", "lastPageStart", "nextPage" and "previousPage" functions. 好吧,我现在看到的简单方法是编写自己的简单寻呼机,并覆盖“ lastPage”,“ lastPageStart”,“ nextPage”和“ previousPage”函数。

In my test example, which I build in ~5min it lookes like this: 在我的测试示例中(我在大约5分钟内构建),它看起来像这样:

public class Ui_mySimplePager extends SimplePager {
public Ui_mySimplePager(TextLocation center, Resources pagerResources,
        boolean b, int i, boolean c) {
    super(center, pagerResources, b, i, c);
}

@Override
public void lastPage() {
    Window.alert("lastPage");
    super.lastPage();
}

@Override
public void lastPageStart() {
    Window.alert("lastPageStart");
    super.lastPageStart();
}

@Override
public void nextPage() {
    Window.alert("nextPage");
    super.nextPage();
}

@Override
public void previousPage() {
    Window.alert("previousPage");
    super.previousPage();
}
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM