desplazarse en las paginas

Para moverse entre las paginas

 public String next() {
        try {
            if (page < (paisRepository.sizeOfPage(rowPage))) {
                page++;
            }
            move(page);
        } catch (Exception e) {
              JsfUtil.errorDialog("next() ", e.getLocalizedMessage());
        }
        return "";
    }

    public String last() {
        try {
            page = paisRepository.sizeOfPage(rowPage);
            move(rowPage);
        } catch (Exception e) {
              JsfUtil.errorDialog("last()", e.getLocalizedMessage());
        }
        return "";
    }

    public String first() {
        try {
            page = 1;
            move(page);
        } catch (Exception e) {
              JsfUtil.errorDialog("first() ", e.getLocalizedMessage());
        }
        return "";
    }

    public String back() {
        try {
            if (page > 1) {
                page--;
            }
            move(page);
        } catch (Exception e) {
              JsfUtil.errorDialog("back()", e.getLocalizedMessage());
        }
        return "";
    }

    public String skip(Integer page) {
        try {
            this.page = page;
            move(page);
        } catch (Exception e) {
  JsfUtil.errorDialog("skip", e.getLocalizedMessage());
        }
        return "";
    }

Last updated

Was this helpful?