Greetings all. I am having difficulty crafting an struts 2 iterator
using the generator tag. I want to iterate over a set of string
values and then test against the current one in the loop. Something
like this:
<s:generator val="%{'wizards,dwarves,elves'}" separator=","
id="myAttr">
<s:iterator>
<s:set name="groupname" value="#attr.myAttr.next"
></s:set>
< want to test groupname here, etc... >
</s:iterator>
</s:generator>
This doesn't work since the use of #attr.myAttr.next actually
iterates the iterator (!) which means the iteration loop skips over
one of the values.
I guess what I'm looking for is the correct ognl expression to get
the current value of the iterator created by the generator. Any ideas?
Kevin