ITeye博客

spring技巧

wander_bird · 2015-02-27 14:33 · spring · 企业架构 · Markdown

1.获取前端request context

@RequestMapping("/search/data")
	public String search(PagingVO page, FrontCourseCatalogSearchVO searchVO, Model model, HttpServletRequest request) {
		page.setPageSize(searchVO.getMySize());
		
		searchVO.setInternalOnly(isInternalOnlySearch());
		
		PagingVO vo = catalogService.search(page, searchVO);
		model.addAttribute("pageSize", page.getPageSize());
		model.addAttribute("pageVO", vo);
		RequestContext context = new RequestContext(request);
		model.addAttribute("lookupDeliveries", lookupService.getDeliveryMethod(context.getLocale().getLanguage()));

		return "view/front/course/search_data";
	}

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。