Thank you for clearing this up.  I had checked the JavaDoc before making
the post, as well, and as you report it is a bit thin.  Never occurred
to me that it was a 1 based index.  I have never seen that before.  I
guess someone thought it useful rather than just doing the math if
needed.

Thanks to all who responded!

-----Original Message-----
From: Chris Pratt [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 26, 2007 4:37 PM
To: Struts Users Mailing List
Subject: Re: [S2] Iterator Tag and Status Count

I think count is a one based position in the iteration where as index is
zero based.  But there is almost no information in the documentation.
The tag library documentation simply says that a InteratorStatus is
pushed on the Value Stack.  And the JavaDocs for IteratorStatus has one
line of "useful" information:

"The iterator tag can export an IteratorStatus object so that one can
get information about the status of the iteration, such as the size,
current index, and whether any more items are available."

Which, since there is no size information in the IteratorStatus, could
be interpreted that the "count" represents the size.  It's too bad there
is no JavaDoc information on the methods, since that could easily clear
up the confusion.
  (*Chris*)

On 9/26/07, Hoying, Ken <[EMAIL PROTECTED]> wrote:
> I believe that I have come across a bug in the iterator tag.  It 
> appears that the count value for the status object is returning (index

> + 1) rather than the size of the collection being iterated over.
>
> Has anyone else seen this behavior?
> Is this the correct behavior and I am just not interepreting its usage

> correctly?
>
> Thank you!
> Ken
>
>
>
> -----------------------------------------
> ***Note:The information contained in this message may be privileged 
> and confidential and protected from disclosure. If the reader of this 
> message is not the intended recipient, or an employee or agent 
> responsible for delivering this message to the intended recipient, you

> are hereby notified that any dissemination, distribution or copying of

> this communication is strictly prohibited. If you have received this 
> communication in error, please notify the Sender immediately by 
> replying to the message and deleting it from your computer. Thank you.

> Premier Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to