2

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

StackOverFlow
  • 4,486
  • 12
  • 52
  • 87

1 Answers1

1

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();
}
}
Stefan
  • 14,826
  • 17
  • 80
  • 143