其他分享
首页 > 其他分享> > ModelAndView设置跳转页面,添加页面传递的值

ModelAndView设置跳转页面,添加页面传递的值

作者:互联网

        @RequestMapping("OperationDetail2")
        public ModelAndView OperationDetail2(HttpServletRequest request,HttpServletResponse response) throws Exception{
            String myId=RequestUtil.getString(request, "myId");
            String jd=RequestUtil.getString(request, "jd");
            Zncxkggj zncxkggj=null;
            if(StringUtil.isNotEmpty(myId)){
                zncxkggj=zncxkggjManager.get(myId);
            }
            ModelAndView mv =new ModelAndView(); 
            mv.addObject("myId", myId); 
            mv.addObject("jd", jd);
            mv.addObject("zncxkggj", zncxkggj);//对象
            //mv.setViewName("xx.jsp");
            mv.setViewName("platform/znwgjglczjl/znwgjelinkMagGztzList.jsp");//需要跳转的页面
            return mv;
//            return getAutoView().addObject("zncxkggj", zncxkggj).addObject("lx", lx).addObject("tab", tab);
        }

 

标签:addObject,跳转,mv,myId,jd,ModelAndView,zncxkggj,页面
来源: https://www.cnblogs.com/yangcaiwen/p/16184503.html