Code example for ModelAndView

Methods: getViewName

0
    @SuppressWarnings({"unchecked"}) 
    @Override 
    public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception { 
        super.postHandle(httpServletRequest, httpServletResponse, o, modelAndView); 
        final PortalTheme theme = themeHandler.getByRequest(httpServletRequest); 
        if (modelAndView != null && !modelAndView.getViewName().startsWith("redirect:")) { 
            modelAndView.addObject("debug", Boolean.valueOf(debug)); 
            modelAndView.addObject("interfaceLanguage", ControllerUtil.getLocale(httpServletRequest)); 
            modelAndView.addObject("cacheUrl", theme.getCacheUrl()); 
            modelAndView.addObject("portalName", portalName); 
            modelAndView.addObject("portalDisplayName", theme.getDisplayName()); 
            modelAndView.addObject("portalBaseUrl", theme.getBaseUrl()); 
            modelAndView.addObject("portalColor", theme.getColorScheme()); 
            modelAndView.addObject("portalTheme", "theme/" + theme.getName()); 
            modelAndView.addObject("portalThemeName", theme.getName()); 
            final QueryParamList queryParamList = FreemarkerUtil.createQueryParamList(httpServletRequest.getParameterMap()); 
            modelAndView.addObject("queryParamList", queryParamList); 
            modelAndView.addObject("defaultParams", queryParamList.getDefaultParamsFormatted()); 
            modelAndView.addObject("includedMacros", includedMacros); 
            modelAndView.addObject("pageGrabber", freeMarkerUtil);