/****************Action****************/
public String execute() throws Exception {
List_Date = this.listCommonService.Common_List(common);//查询所有
if(List_Date!=null && List_Date.size()>0){
for(Common common : List_Date){
if(common.getC_type()!=null && common.getC_type()==null){
List_Date.get(common.getC_id());//传C_id
}
}
}
/****************Service****************/
public List Common_List(Common common) {
List<Common> List_Common = this.commonMapper.Common_List(common); return List_Common;
}
/****************DAO****************/
public List Common_List(Common common);
/****************Mapper.XMl****************/
<!-- 查询导航 -->
<select id="Common_List" parameterType="com.order.model.Common"
resultType="com.order.model.Common">
select *
<include refid="Common_Info" />
order by C_sore asc
<include refid="Common_Linit" />
</select>
<!-- 导航查询条件 -->
<sql id="Common_Info">
from Common where 1=1
<if test="C_title != null and C_title.length() > 0">
and C_title like CONCAT('%',#{C_title},'%')
</if>
<if test="C_createDate != null">
and date(C_createDate) = date(#{C_createDate})
</if>
<if test="C_createDate != null">
and C_type = #{C_id}//分类(C_type)名称等与C_id
</if>
</sql>
/****************页面****************/
<s:iterator id="nav" value="List_Date">
<s:if test="#nav.c_type==null">
<s:property value="#nav.c_id" />
<s:property value="#nav.c_title" />
<s:iterator id="chil" value="List_Date">
<s:if test="#nav.c_id==#chil.c_type">
<s:property value="#chil.c_id" />
<s:property value="#chil.c_title" />
</s:if>
</s:iterator>
</s:if>
</s:iterator>
分享到:
相关推荐
struts2中iterator 标签的使用详解
struts2 标签iterator使用我自己试过的
一个运用Extjs,Struts2, json,iterator技术构建的iterator_jsonDemo2。iterator_jsonDemo1的链接:http://download.csdn.net/detail/cafebar123/8816409 运用了Extjs,Struts2, json,iterator技术, 将数据从...
其实只有一点struts2 iterator标签遍历二维数组
NULL 博文链接:https://takeme.iteye.com/blog/1663239
NULL 博文链接:https://shupili141005.iteye.com/blog/667446
可对struts2 标签如<iterator>等相应列进行求和.
struts2 中标签的使用 这段时间学习用struts2来开发网站,其中对一些struts2的标签在实际操作上有一些体会。 一.关于iterator迭代集合对象的问题:
struts2标签详解 Iterator
webwrok iterator标签status属性使用方法.docwebwrok iterator标签status属性使用方法.docwebwrok iterator标签status属性使用方法.docwebwrok iterator标签status属性使用方法.docwebwrok iterator标签status属性...
该文档 主要描述struts2 常用的一些标签 帮助 对struts标签存在 疑惑的朋友更好更迅速的了解和学习
<%@ taglib uri="/struts-tags" prefix="s" %> 结合例子,重点掌握以下标签的用法 (1) (2) (3) <s:if> 、、 (4) <s:iterator> (5) (6) 、 (7) 、、、 (8) 、、<s:checkboxlist>
webwrok iterator标签status属性使用方法 一看就明白 很清楚
2. 遍历List<List<String>> 3. 遍历UserEntity 4. 遍历List 遍历方法各有长短,若不是多表联接查询、显示表格的列数已经固定,一般用实体类(UserEntity)迭代的方式。相反,显示的数据表格行和列不确定,此时用实体...
将多个集合使用一个<iterator/>标签完成迭代。 generatot标签:将指定的字符串按照规定的分隔符分解成多个子字符串。 merge标签:将多个集合拼接在一起。 subset标签:获取某个集合的子集合。 sort标签:多指定...
主要介绍Strus2中的通用标签,主要有, , , , , , <s:iterator>, , , 等几个标签的具体用法,希望能对大家有帮助。
生成一个简单的iterator,并且使用iterator标签打印出内容。 ,bbb,ccc,ddd,eee'}"> <s:iterator> <s:property /><br/> </s:iterator> 例2: 生成一个iterator,使用count属性。因为count属性值为3,所以只有前...
6.2.1 Struts 2标签API语法 113 6.2.2 使用OGNL设置标签属性 115 6.3 数据标签 117 6.3.1 property标签 117 6.3.2 set标签 118 6.3.3 push标签 119 6.3.4 bean标签 120 6.3.5 action标签 122 6.4 控制标签 124 6.4.1...
Struts 2 标签库(文档手册) Tags-API-CLSW-JSP <%@ taglib prefix="s" uri="/struts-tags" %> 就能使用struts2.0的标签库 下面就介绍每个标签的具体应用实例说明:按字母排列 A: 1. 2. <s:a href=""></s:a>-...
set标签、push标签、if/elseif/else标签、iterator标签、sort标签