s:地图列表上的迭代器
我有一张地图清单 -
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中解析的内容,我看到%{''}
中的任何文本都没有被评估 - 甚至不是简单的文本
谢谢
没有找到相关结果
已邀请:
1 个回复
郡豪靠暖
等等 - 基本上,你忘了s:评估的属性标签。