Code example for ModelAndView

Methods: addObject

0
        return modelAndView;
    } 
     
    @RequestMapping(value = "/viewSavingsAccountRecentActivity", method=RequestMethod.GET)
    public ModelAndView showSavingsAccountRecentActivity(HttpServletRequest request, HttpServletResponse response){
        ModelAndView modelAndView =new ModelAndView();
        sitePreferenceHelper.resolveSiteType(modelAndView, "viewSavingsAccountRecentActivity", request);
        modelAndView.addObject("include_page", new IncludePage(request, response));
         
        String globalAccountNum = request.getParameter("globalAccountNum");
         
        SavingsAccountDetailDto savingsAccountDetailDto = savingsServiceFacade.retrieveSavingsAccountDetails(globalAccountNum);
        modelAndView.addObject("savingsAccountDetailDto", savingsAccountDetailDto);
        modelAndView.addObject("currentDate", new Date());
         
        List<SavingsRecentActivityDto> recentActivity = this.savingsServiceFacade.retrieveRecentSavingsActivities(savingsAccountDetailDto.getAccountId().longValue());
        request.setAttribute("recentActivityList", recentActivity);
         
        savingsServiceFacade.putSavingsBusinessKeyInSession(globalAccountNum, request);
         
Experience pair programming with AI  Get Codota for Java