Child pages
  • iterator
Skip to end of metadata
Go to start of metadata

Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works.

The id attribute is deprecated in Struts 2.1.x, and has been replaced by the var attribute.

The begin, end and step attributes are only available from 2.1.7 on

Description

Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20

Parameters

Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20

Examples

Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
  • No labels

5 Comments

  1. Change "java.util.Collection, java.util.Iterator," to "java.util.Collection, java.util.Iterator, java.util.Enumeration, java.util.Map, array."
    Change "instanceof" to "instance of".
    Change "else an the object" to "else the object".
    Change "and then calls its" to "and the call its".
    Change "used to create a IteratorStatus object" to "used to create an IteratorStatus object".
    Change "seperate" to "separate".
    Change ">s:property />" to "<s:property />".
    Add missing "</s:action>" to second-to-last code sample.
    In the last code sample, there are five elements in the iterator, therefore there must be five indexes, either 0-4 or 1-5. In other words, change the line:

    <!-- current iteration value (0, 1, ... 5) -->

    1. The items that needed correcting have been corrected ("the call its", "missing </s:action" not errors).

  2. Description of attribute id should be marked with Struts version, deprecated since Struts 2.1.x, it is a common mistake for new Struts developers

    1. Indeed. Since I don't have access to the source repository atm, I've added a note on tope of the page. Thanks for the heads up.

  3. The section where the action and iterator tag are together is very hard to read. Mostly because there are three different things called "entries". It also doesn't help that there's no java code to go with the example. I admit that I'm a Struts2 newbie, but it took me about 20-30 minutes of trial and error to get it working.
    <s:action name="entries" var="entries"/>
               <s:iterator value="#entries.entries" >...