Exemplo n.º 1
0
 @RequestMapping("main/list.do")
 public String main_list(String page, Model model) throws Exception {
   if (page == null) page = "1";
   int curpage = Integer.parseInt(page);
   List<Item> list = dao.getAniAllData(curpage);
   int totalpage = dao.getTotalPage(curpage);
   model.addAttribute("list", list);
   model.addAttribute("curpage", curpage);
   model.addAttribute("totalpage", totalpage);
   return "main/list";
 }
Exemplo n.º 2
0
 @RequestMapping("main/detail.do")
 public String aniDetail(String no, int page, Model model) throws Exception {
   Item item = dao.aniDetail(no, page);
   model.addAttribute("item", item);
   model.addAttribute("page", page);
   return "main/detail";
 }