关于s:iterator 和s:if 的结合使用

<s:iterator value="list" status="st">
<div class="sidebar-nav">
<s:if test="%{functionid==1}">
<div class="nav-header" data-toggle="collapse" data-target="#dashboard-menu">
<i class="icon-dashboard">
</i>商品管理</div>

<ul id="dashboard-menu" class="nav nav-list collapse in">

<s:if test="%{lookPermission==1}">
<li ><a href="showAllGoods.jsp">浏览商品(按类别浏览,分页)</a></li>
</s:if>
<s:if test="%{addPermission==1}">
<li ><a href="403.html">添加商品</a></li>
</s:if>
<s:if test="%{deletePermission==1}">
<li ><a href="500.html">删除商品</a></li>
</s:if>
<s:if test="%{editPermission==1}">
<li ><a href="503.html">修改商品</a></li>
</s:if>
</ul>
</s:if>

<s:if test="%{functionid==2}">
<div class="nav-header" data-toggle="collapse" data-target="#legal-menu">
<i class="icon-legal"></i>商品类别管理
</div>
<ul id="legal-menu" class="nav nav-list collapse in">
<s:if test="%{lookPermission==1}">
<li ><a href="privacy-policy.html">浏览类别</a></li>
</s:if>
<s:if test="%{addPermission==1}">
<li ><a href="privacy-policy.html">添加类别</a></li>
</s:if>
<s:if test="%{deletePermission==1}">
<li ><a href="privacy-policy.html">删除类别功能慎重</a></li>
</s:if>
<s:if test="%{editPermission==1}">
<li ><a href="privacy-policy.html">修改信息</a></li>
</s:if>
</ul>
</s:if>

</s:iterator>

上一篇:php的字符串转2进制函数


下一篇:注意:MainActivity的oncreate方法里不要再inflate布局了(MainActivity里的点击事件无响应)