Exemplo n.º 1
0
 @RequestMapping(value = "userList", method = RequestMethod.GET)
 @PageableDefaults(sort = "id=asc")
 @SearchableDefaults(value = "deleted_eq=0")
 public String main(Searchable searchable, Model model) {
   setCommonData(model);
   searchable.removePageable();
   model.addAttribute("page", baseService.findAll(searchable));
   return viewName("main");
 }
Exemplo n.º 2
0
  @RequestMapping(
      value = {"{organization}/{job}"},
      method = RequestMethod.GET)
  @PageableDefaults(sort = "id=desc")
  @SearchableDefaults(value = "deleted_eq=0")
  public String list(
      @PathVariable("organization") Organization organization,
      @PathVariable("job") Job job,
      Searchable searchable,
      Model model) {

    setCommonData(model);

    if (organization != null && !organization.isRoot()) {
      searchable.addSearchParam("organizationId", organization.getId());
    }
    if (job != null && !job.isRoot()) {
      searchable.addSearchParam("jobId", job.getId());
    }
    return super.list(searchable, model);
  }