struts2的debug标签位置对iterator嵌套的影响...
childlist是parentlist里面的对象parent中的一个属性.虽然写的是ww: 但其实用的是struts2 所以ww:相当于s:
<ww:debug />
<ww:iterator value="parentlist" status="parentstatus" >
<table width="100%">
<tr>
<td>
<ww:iterator value="childlist" status="childstatus">
<ww:property value="childname" />
</ww:iterator>
<br />
</td>
</tr>
</table>
</ww:iterator>
如果把<ww:debug />放在页首,那么childlist的内容就无法显示
如果放在页面最下面,则可以正常显示.
这是什么原理?
--------------------编程问答-------------------- 没这么玩过 --------------------编程问答-------------------- 第一次听说这情况。。。 --------------------编程问答-------------------- 下班前再顶一次
补充:Java , Web 开发