码迷,mamicode.com
首页 > Web开发 > 详细

ModelAndView中设置List,jsp中获取

时间:2016-03-15 20:22:07      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:

mav = new ModelAndView("view/frame/index");
mav.addObject("menuList", menuList);

 jsp中 

<%
	List<Integer> menuList = (java.util.List<Integer>) request.getAttribute("menuList");
%>
<% for (Integer i : menuList) {
			  			if(i.intValue() == 1) {
			  %>
			<div class="col-md-2">
			  <div class="box_1">
			   <div class="inner_row" id="systemMonitor">
			   	 <span class="glyphicon glyphicon-cloud icon_1" aria-hidden="true"></span>
				 <h3>系统监控</h3>
			   </div>
			  </div>
			</div>
			<%                     } %>
			<%if(i.intValue() == 2) { %>
			<div class="col-md-2">
			  <div class="box_1">
			   <div class="inner_row" id="mochaItom">
				 <span class="glyphicon glyphicon-film icon_1" aria-hidden="true"></span>
				 <h3>运维管理</h3>
			   </div>
			  </div>
			</div>
			<%                     } %>
			<%if(i.intValue() == 3) { %>
			<div class="col-md-2">
			  <div class="box_1">
			   <div class="inner_row" id="bureauData">
				 <span class="glyphicon glyphicon-send icon_1" aria-hidden="true"></span>
				 <h3>局数据审批</h3>
			   </div>
			  </div>
			</div>
			<%                     } %>
			<%if(i.intValue() == 4) { %>
			<div class="col-md-2">
			  <div class="box_1">
			   <div class="inner_row" id="settlement">
				 <span class="glyphicon glyphicon-send icon_1" aria-hidden="true"></span>
				 <h3>结算</h3>
			   </div>
			  </div>
			</div>
			<%                     } %>
			<%if(i.intValue() == 5) { %>
			<div class="col-md-2">
			  <div class="box_1">
			   <div class="inner_row" id="authority">
				 <span class="glyphicon glyphicon-send icon_1" aria-hidden="true"></span>
				 <h3>权限管理</h3>
			   </div>
			  </div>
			</div>
			<%                     }%>
			<%}%>

  

ModelAndView中设置List,jsp中获取

标签:

原文地址:http://www.cnblogs.com/Yahoo-CityGun/p/5280707.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!