예제 #1
0
 /**
  * Displays to user a list of branches from the chosen section.
  *
  * @param sectionId section for display
  * @return {@code ModelAndView} the chosen section
  * @throws org.jtalks.jcommune.service.exceptions.NotFoundException when section not found
  */
 @RequestMapping(value = "/sections/{sectionId}", method = RequestMethod.GET)
 public ModelAndView branchList(@PathVariable("sectionId") long sectionId)
     throws NotFoundException {
   Section section = sectionService.get(sectionId);
   User user = securityService.getCurrentUser();
   return new ModelAndView("branchList")
       .addObject("section", section)
       .addObject("pageSize", Pagination.getPageSizeFor(user))
       .addObject("breadcrumbList", breadcrumbBuilder.getForumBreadcrumb());
 }