Code example for ModelAndView

Methods: addObject

0
	    return modelAndView;
	} 
	 
	@RequestMapping(value = "/viewCenterDetails", method=RequestMethod.GET)
	public ModelAndView showCenterDetails(HttpServletRequest request, HttpServletResponse response) {
	    ModelAndView modelAndView = new ModelAndView();
	    sitePreferenceHelper.resolveSiteType(modelAndView, "viewCenterDetails", request);
	    modelAndView.addObject("include_page", new IncludePage(request, response));
	     
	    String centerSystemId = request.getParameter("globalCustNum");
	    CenterInformationDto centerInformationDto = this.centerServiceFacade.getCenterInformationDto(centerSystemId);
	     
	    modelAndView.addObject("centerInformationDto", centerInformationDto);
	     
        modelAndView.addObject("currentPageUrl", UrlHelper.constructCurrentPageUrl(request));
        request.getSession().setAttribute("backPageUrl", request.getAttribute("currentPageUrl"));   
        centerServiceFacade.putCenterBusinessKeyInSession(centerSystemId, request);
         
	    return modelAndView;
	}