首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

struts2 s:iterator取包孕LIST的MAP

2012-09-17 
struts2 s:iterator取包含LIST的MAP?private MapString, ListString yearMonthMap new HashMapStri

struts2 s:iterator取包含LIST的MAP

?

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="struts2 s:iterator取包孕LIST的MAP" /></span><span id="closespan${yeargd.key}" style="display:none;"><img onclick="closeYearMonthDiv(${yeargd.key})" src="${ctx}/style/skin1/images/min_gray.jpg" alt="struts2 s:iterator取包孕LIST的MAP" /></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>

热点排行