1.8 move()
RolController.java
@Override
public void move(Integer page) {
try {
this.page = page;
rolDataModel = new RolDataModel(rolList);
Document doc;
// switch ((String) JmoordbContext.get("searchrol")) {
switch (getSearch()) {
case "_init":
rolList = rolRepository.findPagination(page, rowPage);
break;
case "_autocomplete":
break;
case "idrol":
if (getValueSearch() != null) {
rolSearch.setIdrol(getValueSearch().toString());
doc = new Document("idrol", rolSearch.getIdrol());
rolList = rolRepository.findPagination(doc, page, rowPage, new Document("idrol", -1));
} else {
rolList = rolRepository.findPagination(page, rowPage);
}
break;
case "rol":
if (getValueSearch()!= null) {
rolSearch.setRol(getValueSearch().toString());
rolList = rolRepository.findRegexInTextPagination("rol", rolSearch.getRol(), true, page, rowPage, new Document("rol", -1));
} else {
rolList = rolRepository.findPagination(page, rowPage);
}
break;
case "activo":
if (getValueSearch() != null) {
rolSearch.setActivo(getValueSearch().toString());
doc = new Document("activo", rolSearch.getActivo());
rolList = rolRepository.findPagination(doc, page, rowPage, new Document("idrol", -1));
} else {
rolList = rolRepository.findPagination(page, rowPage);
}
break;
default:
rolList = rolRepository.findPagination(page, rowPage);
break;
}
rolDataModel = new RolDataModel(rolList);
} catch (Exception e) {
errorServices.errorMessage(nameOfClass(), nameOfMethod(), e.getLocalizedMessage());
}
}CarreraController.java
SecretarioAdministrativo.java
Last updated