move

@Override
    public void move() {

        try {

            Document doc;
            switch (loginController.get("searchmarca")) {
                case "_init":
                case "_autocomplete":
                        marcaList = marcaRepository.findPagination(page, rowPage);

                    break;



                case "idmarca":
                    if(lookupServices.getIdmarca()!= null){
                        doc = new Document("idmarca", lookupServices.getIdmarca());
                        marcaList = marcaRepository.findBy(doc);
                    }else{
                           marcaList = marcaRepository.findPagination(page, rowPage);
                    }




                    break;
                case "descripcion":
                    marcaList = marcaRepository.findRegexInTextPagination("descripcion", lookupServices.getDescripcion(), true, page, rowPage, new Document("descripcion", -1));
                    break;

                default:

                    marcaList = marcaRepository.findPagination(page, rowPage);
                    break;
            }

            marcaFiltered = marcaList;

            marcaDataModel = new MarcaDataModel(marcaList);

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

Last updated