Bhaarat Sharma wrote:
sadly in my case i need to :(

But this takes us back, the pseudocode you are suggesting is not possible
using s:iterate, I dont think we have the ability to move the cursor (or
current value in top stack) withtin the iterator tag.  Neither does jstl
provide this.  So sadly, will my code have to sit back in time and use
scriptlets.

....

Where does my code do anything with the iterator/cursor?

I'll write it out even more:

Foo prev;
boolean alt = false;
for (Foo curr : foos) {
    if (alt) {
        // Do something with prev and curr.
    } else prev = curr;
    alt = !alt;
}

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to