| 1 | * EgovBoardController.java |
---|
| 2 | {{{ |
---|
| 3 | @RequestMapping(value = "/brd/egovBoardList.do") |
---|
| 4 | public String selectBoardList( |
---|
| 5 | @ModelAttribute("searchVO") SearchVO searchVO, ModelMap model) |
---|
| 6 | throws Exception { |
---|
| 7 | |
---|
| 8 | /** EgovPropertyService.sample */ |
---|
| 9 | searchVO.setPageUnit(propertiesService.getInt("pageUnit")); |
---|
| 10 | searchVO.setPageSize(propertiesService.getInt("pageSize")); |
---|
| 11 | |
---|
| 12 | /** pageing setting */ |
---|
| 13 | PaginationInfo paginationInfo = new PaginationInfo(); |
---|
| 14 | paginationInfo.setCurrentPageNo(searchVO.getPageIndex()); |
---|
| 15 | paginationInfo.setRecordCountPerPage(searchVO.getPageUnit()); |
---|
| 16 | paginationInfo.setPageSize(searchVO.getPageSize()); |
---|
| 17 | |
---|
| 18 | searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); |
---|
| 19 | searchVO.setLastIndex(paginationInfo.getLastRecordIndex()); |
---|
| 20 | searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); |
---|
| 21 | |
---|
| 22 | List boardList = boardService.selectBoardList(searchVO); |
---|
| 23 | model.addAttribute("resultList", boardList); |
---|
| 24 | |
---|
| 25 | int totCnt = boardService.selectBoardListTotCnt(searchVO); |
---|
| 26 | paginationInfo.setTotalRecordCount(totCnt); |
---|
| 27 | model.addAttribute("paginationInfo", paginationInfo); |
---|
| 28 | |
---|
| 29 | return "brd/egovBoardList"; |
---|
| 30 | } |
---|
| 31 | }}} |