我有这个迭代器的问题......它不会得到迭代器的索引,所以我可以输入一个“如果”......它直接进入其他......我想我没有得到正确索引,但我不知道如何...如果可以,请提供帮助
<s:iterator value="fileNames" status="idx">
<s:set name="index" value="#idx.index"/>
<s:if test="%(#index)=4" >
<div id="ngg-image-01" class="ngg-gallery-thumbnail-box">
<div class="ngg-gallery-thumbnail">
<a id="1" rel="prettyPhoto[set_1]"
href="${pageContext.request.contextPath}/userfiles/images/inside/7-
days/prettyPhoto[set_1]/<s:property/>" alt="<s:property/>"><br />
<img title="revederepensiune-vara-02"
src="userfiles/images/inside/7-days/prettyPhoto[set_1]/thmbs/<s:property/>"
alt="" width="89" height="66" /><br /></a></div>
</div>
</s:if>
<s:else>
<div id="ngg-image-01" class="ngg-gallery-thumbnail-box">
<div class="ngg-gallery-thumbnail">
<a id="1" rel="prettyPhoto[set_1]"
href="${pageContext.request.contextPath}/userfiles/images/inside/7-
days/prettyPhoto[set_1]/<s:property/>" alt="<s:property/>"><br />
<img title="revederepensiune-vara-02"
src="userfiles/images/inside/7-days/prettyPhoto[set_1]/thmbs/<s:property/>"
alt="" width="89" height="66" /><br /></a></div>
</div>
</s:else>
</s:iterator>