Esempio n. 1
0
 @RequestMapping(value = "content/update/", method = RequestMethod.POST)
 public String updateContent(BoardVO boardVO, SearchVO searchVO, RedirectAttributes rttr)
     throws Exception {
   logger.info("content/update/ post...");
   logger.info(searchVO.toString());
   boardService.updateContent(boardVO);
   rttr.addAttribute("page", searchVO.getPage());
   rttr.addAttribute("perPageNum", searchVO.getPerPageNum());
   rttr.addAttribute("searchType", searchVO.getSearchType());
   rttr.addAttribute("keyword", searchVO.getKeyword());
   rttr.addFlashAttribute("result", "success");
   logger.info(rttr.toString());
   return "redirect:/sboard/contents/";
 }
Esempio n. 2
0
  @RequestMapping("contents/")
  public String listPage(
      @ModelAttribute("searchVO") SearchVO searchVO, PageMaker pageMaker, Model model)
      throws Exception {
    logger.info(searchVO.toString());

    // model.addAttribute("cntList", boardService.listPaginate(searchVO));
    model.addAttribute("cntList", boardService.listSearch(searchVO));

    pageMaker.setPageVO(searchVO);
    // pageMaker.setTotalCount(boardService.countPaging(searchVO));
    pageMaker.setTotalCount(boardService.listSearchCount(searchVO));
    model.addAttribute("pageMaker", pageMaker);

    return "sboard/contents";
  }