简体   繁体   中英

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

I am using 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.

In my test example, which I build in ~5min it lookes like this:

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();
}
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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