In Struts 1.1, there's an 'indexId' attribute on the <logic:iterate> tag
which should do what you want.

--
Martin Cooper


----- Original Message -----
From: "Nicola Taylor" <[EMAIL PROTECTED]>
To: "Struts-User (E-mail)" <[EMAIL PROTECTED]>
Sent: Tuesday, August 14, 2001 9:00 AM
Subject: Index within iterate tags


> Hi,
>
> were using the indexed properties tags and it'd be useful to know the
> current index in the jsp (to do some javascript stuff).  Is there any
> standard way to access the current index in the iterator?
>
> 1) write a custom tag to return:
> IterateTag iterateTag = (IterateTag) findAncestorWithClass(this,
> IterateTag.class);
> iterateTag.getIndex();
>
> 2) have a counter variable that we increment within the iterate loop.
>
> Cheers
>
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
>
> www.mimesweeper.com
> **********************************************************************
>


Reply via email to