or use .index to know the index for assisting get the item value.
Here is an example supposing you have a source with DataType int[] array named statusCounts.
<s:iterator value="statusCounts" status="count">Reference:
<s:if test='%{statusCounts[#count.index]>0}'>
<s:property>
</s:if>
<s:else>
</s:else>
</s:iterator>
https://struts.apache.org/tag-developers/iterator-tag.html
https://stackoverflow.com/questions/19856296/to-access-the-index-value-of-struts-iterator-in-scriptlet-array-index
No comments :
Post a Comment