code: public void rebuild(final SimplePager pager) {
          clear();
  
          if (pager.getPageCount() == 0) {
              return;
          }
  
          final AnchorListItem prev = addPreviousLink();
          prev.addClickHandler(new ClickHandler() {
              @Override
              public void onClick(final ClickEvent event) {
                  pager.previousPage();
                  updatePaginationState(pager);
              }
          });
          prev.setEnabled(pager.hasPreviousPage());
  
          for (int i = 0; i < pager.getPageCount(); i++) {
              final int display = i + 1;
              final AnchorListItem page = new AnchorListItem(String.valueOf(display));
              page.addClickHandler(new ClickHandler() {
                  @Override
                  public void onClick(final ClickEvent event) {
                      pager.setPage(display - 1);
                      updatePaginationState(pager);
                  }
              });
  
              if (i == pager.getPage()) {
                  page.setActive(true);
              }
  
              add(page);
          }
  
          final AnchorListItem next = addNextLink();
          next.addClickHandler(new ClickHandler() {
              @Override
              public void onClick(final ClickEvent event) {
                  pager.nextPage();
                  updatePaginationState(pager);
              }
          });
          next.setEnabled(pager.hasNextPage());
      }
docs: This will help to rebuild the Pagination based on the data inside the SimplePager passed in.
  <p/>
  Make sure to all this after adding/remove data from any of the grid to ensure that this stays
  current with the SimplePager.
  <p/>
  ex.
  dataProvider.getList().addAll(newData);
  pagination.rebuild(mySimplePager);
  
  @param pager the SimplePager of the CellTable/DataGrid