标签遍历Map<key,List<Object>>

listMap=new HashMap<String,List<Student>>();   

        List<Student> list1=new ArrayList<Student>();
list1.add(new Student(new Long(1),"20034140201","张三1","男",25));
list1.add(new Student(new Long(2),"20034140202","张三2","男",25));
list1.add(new Student(new Long(3),"20034140203","张三3","男",25));
listMap.put("class1", list1); List<Student> list2=new ArrayList<Student>();
list2.add(new Student(new Long(1),"20034140301","李四1","男",20));
list2.add(new Student(new Long(2),"20034140302","李四2","男",21));
list2.add(new Student(new Long(3),"20034140303","李四3","男",22));
list2.add(new Student(new Long(4),"20034140304","李四4","男",23));
listMap.put("class2", list2);
 <s:iterator value="listMap" id="column">
<s:set name="total" value="#column.value.size"/>
<s:iterator value="#column.value" status="s">
<tr>
<s:if test="#s.first"><td rowspan="${total}"><s:property value="#column.key"/></td></s:if>
<td><s:property value="id"/></td>
<td><s:property value="num"/></td>
<td><s:property value="name"/></td>
<td><s:property value="sex"/></td>
<td><s:property value="age"/></td>
</tr>
</s:iterator>
</s:iterator>

标签遍历List<Map<key,Object>>

         <s:iterator value="recipientInfoList" var="recipientInfo">
<tr>
<s:iterator value="recipientInfo" id="ri" status="map">
<s:iterator value="#ri.value">
<td width="25px">
<s:property value="cjf"/>
</td>
<td width="25px">
<s:property value="unit"/>
</td>
</s:iterator>
</s:iterator>
</tr>
</s:iterator>

struts2配置文件,重定向action并传真

<action name="updateCampaign" class="campaignAction" method="updateCampaign">
<result name="success" type="redirectAction">
<param name="actionName">viewCampaignDetail</param>
<param name="campaignId">${campaignId}</param>
</result>
</action>

struts接收数组

publicclass A {

    private String param[];

    public String[] getParam() {

       returnparam;

    }

    publicvoid setParam(String[] param) {

       this.param = param;

    }

    publicvoid execute(){

       for(int i=0;i<this.param.length;i++){

           System.out.println(this.param[i]);

       }

    }

}

参考链接

http://blog.csdn.net/hakunamatata2008/article/details/5295500

http://blog.csdn.net/shen516/article/details/10111677

最新文章

  1. DDD中的Unitwork与DomainEvent如何相容?(续)
  2. [Sass]声明变量
  3. Spring和EJB3的技术对比
  4. 用canvas开发H5游戏小记
  5. 如何自己编写一个easyui插件
  6. [译]git clone
  7. [转载]Linux命令笔记
  8. respond.js
  9. 转义字符_MySQL识别下面的转义序列
  10. Ecological Premium
  11. Unity 区分不同平台
  12. MvvmLight 绑定
  13. ios开发--苹果企业开发者账号
  14. phpcms V9实现QQ登陆OAuth2.0
  15. 几种连接数据库的OLEDB驱动程序
  16. Spring的IOC
  17. HTML之学习笔记(八)表格
  18. android的fragments管理
  19. hdu_5862_Counting Intersections(扫描线)
  20. image图片拉伸

热门文章

  1. python第三篇:python、flask关系映射
  2. HTML5学习笔记——1
  3. 【前端】【javascript】es6中的遍历器接口Iterator
  4. Python 标准库 —— 邮件(email)与邮件服务器(smtplib)
  5. poj 1519 Digital Roots (计算根数字)
  6. HTTP 的若干问题
  7. UML核心元素--分析类
  8. java基础知识(3)----面向对象
  9. asp页面重定向
  10. JS 数组的一些方法