Struts2 <s:iterator> 遍历 List<Map<String, String>>
<s:iterator value="#request.list" id="map" status="stat">
???<tr>
?????? <td align="center">
????? <s:property? value="#stat.count" /></td>
????<td align="center">
????? ${map.drug_no }</td>
????<td align="center">
????? ${map.drug_name }</td>
????<td align="center">
????? ${map.stock_pack_type }</td>
????<td align="center">
????? ${map.stock_pack_unit }</td>
????<td align="center">
????? ${map.drug_batch_no }</td>
????<td align="center">
????? ${map.num }</td>
????<td align="center">
????? ${map.retail_price }</td>
????<td align="center">
????? ${map.vendor }</td>
????<td align="center">
????? ${map.validity_date }</td>
????<td align="center">
??????????????????? <img src="<%=imgPath %>/add/editt.gif" onMouseOver="this.style.cursor='hand'"
???????border="0" onClick="edit('${map.row_id }')" /></td>
????<td align="center">
????? <img? src="<%=imgPath %>/add/delete.gif" onMouseOver="this.style.cursor='hand'"
??????????? border="0" onClick="del('${map.row_id }')"> </td>
???</tr>
??</s:iterator>
?
说明:<s:iterator value="#request.list" id="map" status="stat">
#request.list: 后台request.setAttribute("list", list); 保存值
map:? list中保存的是Map
stat:? 获取遍历索引
?
${map.retail_price }:通过EL表达式获取Map中的值