【发布时间】:2011-04-11 07:46:44
【问题描述】:
我有一张地图列表 - listMaps List<Map<String,Object>>
我想使用s:iterator 使用特定键值动态构建图像源
我尝试了以下方法,但没有得到任何结果
<s:iterator value="lastMaps" var="listMap" status="st">
test 1 <img src="<%=request.getContextPath()%>/image/%{#listMap.key}.jpg" />
test 2 <img src="<%=request.getContextPath()%>/image/%{'lastMaps['+#st.index+'].key'}.jpg" />
test 3 <img src="<%=request.getContextPath()%>/image/%{top['key']}.jpg" />
</s:iterator>
我查看了在 firebug 中解析的内容,我发现 %{''} 中的任何文本都没有被评估 - 甚至不是简单的文本
谢谢
【问题讨论】: