You just add the "indexId" attribute to the tag, with a value being the name of the 
bean you want to use for your counter.  You just reference that inside your iterate 
loop, as either a page-scoped attribute or a scriptlet.

It's an Integer object, and yes, you can compare it with logic:equal.

> -----Original Message-----
> From: Jana Navaneethan [mailto:jana.navaneethan@;labs.gte.com]
> 
> Hi,
>          I have a <logic:iterate> tag in my JSP which is a 
> Vector and I can
> display all the contents in my page. Problem is I need to get 
> the index
> value of the Vector in my JSP and I should be able to 
> increment this index
> for displaying purpose. Is it possible to do that using 
> <logic:iterate>?
> 
> My Iterate tag looks like this
> <logic:iterate id="listings" name="viewListing" 
> property="listingsSummary"
> type="com.XXX.ViewListingBean">
> I know there is a "indexId" property in iterate tag, How to 
> use this? Do I
> need define anything in my bean? Can I compare the indexId value with
> <logic:Equal> tag? Is it a String value?

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to