Plantillas Primefaces JSF
  • Introduction
  • Proyecto JEE
    • Introduccion
    • POSEIDON
    • Descomprimir template
    • Proyecto JEE
    • Dependencias
    • Sources
    • Ejecutar proyecto
    • TEMPLATE RESPONSIVE
    • Plantilla Bootfaces
      • Introduction
      • Plantilla
        • Clonar Template
        • Proyecto EJB
        • Proyecto Web
        • template base
        • top
        • footer.xhtml
        • Properties
        • Roles
        • Util
        • template base
        • page
  • Capitulo II. Crear EJB
    • MongoDB
    • Proyecto EJB
    • Dependencias
    • Paquetes
    • Provider
    • Entity
    • Repository
    • Converter
    • Services
    • Datamodel
  • Capitulo III. Configuracion
    • Paquetes
    • Util
    • Properties
    • Template
    • Footer
    • Logo
    • Componentes
  • Capitulo IV. Login
    • Dependencias ejb
    • Roles
    • ApplicationMenu
    • RolAdministrador
    • ValidadorRoles
    • LoginController
    • Login.xhtml
  • Capitulo V. Menu
    • Menu
  • Capitulo VI Controller
    • Controller Simple
    • Implementar IController
    • Colapsar Codigo
    • Atributos
    • GetPages
    • Init
    • Reset
    • Prepare
    • ShowAll
    • IsNew
    • Save
    • Edit
    • Delete
    • Print
    • handleSelected
    • Paginacion
    • Codigo Completo
  • Capitulo VII Formularios
    • Carpetas
    • list.xhtml
    • new
    • view
  • Capitulo X Referenciados y Embebidos
    • Referenciados
  • Plantilla Bootfaces
    • Untitled
Powered by GitBook
On this page
  • public String last()
  • public String first()
  • public String next()
  • public String back()
  • public String skip(Integer page)
  • public void move()

Was this helpful?

  1. Capitulo VI Controller

Paginacion

public String last()

@Override
    public String last() {
        try {
            page = bodegaFacade.sizeOfPage(rowPage);
            move();
        } catch (Exception e) {
            JsfUtil.errorMessage("last() " + e.getLocalizedMessage());
        }
        return "";
    }

public String first()

@Override
    public String first() {
        try {
            page = 1;
            move();
        } catch (Exception e) {
            JsfUtil.errorMessage("first() " + e.getLocalizedMessage());
        }
        return "";
    }

public String next()

   @Override
    public String next() {
        try {
            if (page < (bodegaFacade.sizeOfPage(rowPage))) {
                page++;
            }
            move();
        } catch (Exception e) {
            JsfUtil.errorMessage("next() " + e.getLocalizedMessage());
        }
        return "";
    }

public String back()

  @Override
    public String back() {
        try {
            if (page > 1) {
                page--;
            }
            move();
        } catch (Exception e) {
            JsfUtil.errorMessage("back() " + e.getLocalizedMessage());
        }
        return "";
    }

public String skip(Integer page)

@Override
    public String skip(Integer page) {
        try {
            this.page = page;
            move();
        } catch (Exception e) {
            JsfUtil.errorMessage("skip() " + e.getLocalizedMessage());
        }
        return "";
    }

public void move()

@Override
    public void move() {
        try {

            bodegaList = bodegaFacade.findPagination(page, rowPage);

            bodegaFiltered = bodegaList;

            bodegaDataModel = new BodegaDataModel(bodegaList);

        } catch (Exception e) {
            JsfUtil.errorMessage("move() " + e.getLocalizedMessage());
        }
    }
PrevioushandleSelectedNextCodigo Completo

Last updated 6 years ago

Was this helpful?