Hello, I want to successively call several iterators. This works perfectly fine with a merged iterator, but now I need to know to which iterator the currently processed entry belongs to, since they have to be treated differently.
See the small example below that illustrates my intention. Currently I
just check if the current entry is an odd number or not, but this does
not work if numbers.length>operators.length+1 or even
operators.length<numbers.length; do you have any suggestion how to solve
this?
<s:merge id="mergedIterator">
<s:param value="numbers" />
<s:param value="operators" />
</s:merge>
<s:iterator value="%{#mergedIterator}" status="iterStatus">
<s:if test="#iterStatus.odd">
NUMBER
</s:if>
<s:else>
OPERATOR
</s:else>
</s:iterator>
Thanks,
Anton
signature.asc
Description: OpenPGP digital signature

