> I need to access the iterator index for a list i'm iterating over, using
> the webwork jsp taglib.  Is there a way to access the current index
> value from within the iterator tag?

Of course.

<ww:iterator value="users" status="'status'">

iterates over users and puts a webwork.view.taglib.IteratorStatus object
into the page context. Reading the javadocs for this class should give you
all the nice features it has, but to mention one it has the isOdd() method
so you can do stuff like:

<ww:if test="@status/odd == true">
    odd!
</ww:if>

which is nice. Getting the index is as simple as @status/index, and so
forth. Hope this helps.

Anders Hovm�ller
[EMAIL PROTECTED] http://boxed.killingar.net



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to