private Map<String, List<String>> yearMonthMap = new HashMap<String, List<String>>();
List<String> strList = Lists.newArrayList();
strList.add("01");
strList.add("02");
strList.add("03");
yearMonthMap.put("2011", strList);
yearMonthMap.put("2012", strList);
<s:iterator value="yearMonthMap" id="yeargd">
<div style="margin:5px 0;">
<div style="padding-left:5px;">
<span id="showspan${yeargd.key}"><img onclick="showYearMonthDiv(${yeargd.key})" src="${ctx}/style/skin1/images/max_gray.jpg" alt="展开" /></span><span id="closespan${yeargd.key}" style="display:none;"><img onclick="closeYearMonthDiv(${yeargd.key})" src="${ctx}/style/skin1/images/min_gray.jpg" alt="关闭" /></span>
<span><a href="${ctx}/memo/memo.action?currYearMonth=${yeargd.key}-01"><s:property value="#yeargd.key"/>年归档</a></span>
</div>
<div id="yearmonthdiv${yeargd.key}" style="display:none;padding-left:20px;border:1px gray dashed;">
<s:iterator value="#yeargd.value" id="monthgd">
<div><a href="${ctx}/memo/memo.action?currYearMonth=${yeargd.key}-${monthgd}&ifMonth=yes"><s:property value="#yeargd.key"/>年<s:property value="monthgd"/>月</a></div>
</s:iterator>
</div>
</div>
</s:iterator>
分享到:
相关推荐
NULL 博文链接:https://takeme.iteye.com/blog/1663239
包含 strust2 s:iterator 一些常用情况的总结 如 遍历数组、list、map 并且list又分2种情况,map又分4种情况等。
NULL 博文链接:https://takeme.iteye.com/blog/1663039
2. <s:checkboxlist list=""></s:checkboxlist>-----多选框 3. <s:combobox list=""></s:combobox>-----下拉框 4. <s:component></s:component>-----图像符号 D: 1. <s:date/>-----获取日期格式 2. <s:...
本书是广受赞誉的Struts 2优秀教程,它全面而深入地阐述了Struts 2的各个特性,并指导开发人员如何根据遇到的问题对症下药,选择使用最合适的特性。作者处处从实战出发,在丰富的示例中直观地探讨了许多实用的技术,...
iteratot标签:对集合属性迭代(属性类型:List、Map、数组)。 append标签:将多个集合对象拼接在一起,组成一个新的集合。将多个集合使用一个<iterator/>标签完成迭代。 generatot标签:将指定的字符串按照规定...
书中介绍了如何利用Struts 2 来解决Web 应用开发中的常见问题,同时还深入浅出地探讨了许多能帮助程序员编写Struts 2 应用程序的技巧,如管理页面导航活动、输入验证、国际化和本地化、对Ajax 的支持,等等。...
import org.apache.struts2.ServletActionContext; import com.jswf.sys.SysParams; import com.jswf.vo.UserVo; import com.opensymphony.xwork2.ActionContext; public class DialogHttpSessionListner ...
\contentsline {chapter}{Contents}{2}{section*.1} {1}Java基础}{17}{chapter.1} {1.1}基本语法}{17}{section.1.1} {1.2}数字表达方式}{17}{section.1.2} {1.3}补码}{19}{section.1.3} {1.3.1}总结}{23}{...
多态性包括参数化多态性和包含多态性。多态性语言具有灵活、抽象、行为共享、代码共享的优势,很好的解决了应用程序函数同名问题。 5、String是最基本的数据类型吗? 基本数据类型包括byte、int、char、long、...
多态性包括参数化多态性和包含多态性。多态性语言具有灵活、抽象、行为共享、代码共享的优势,很好的解决了应用程序函数同名问题。 2、String是最基本的数据类型吗? 基本数据类型包括byte、int、char、long、float、...
2.s-EJB 与 e-EJB的区别 3.会话面的作用 4.cmp与bmp的优缺点 5.j2me程序的必需的几个部分 6.c/s与b/s的区别 7.构建一个connect pool,然后再调用它, 8.j2ee平台与dotnet平台的区别 9.ejb的life cycle 10....
20. List、Set、Map 之间的区别是什么? 9 21. HashMap 和 Hashtable 有什么区别? 10 22. 如何决定使用 HashMap 还是 TreeMap? 10 23. 说一下 HashMap 的实现原理? 10 24. 说一下 HashSet 的实现原理? 11 25. ...
面试题包括以下十九部分:Java 基础、容器、多线程、反射、对象拷贝、Java Web 模块、异常、网络、设计模式、Spring/Spring MVC、Spring Boot/Spring Cloud、Hibernate、Mybatis、RabbitMQ、Kafka、Zookeeper、MySql...