Changes for page WORepetition

Last modified by Pascal Robert on 2012/01/30 22:24

From version 8.1
edited by Pascal Robert
on 2011/04/26 23:04
Change comment: There is no comment for this version
To version 9.1
edited by Pascal Robert
on 2012/01/30 22:24
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -2,15 +2,32 @@
2 2  
3 3  = Introduction =
4 4  
5 +A WORepetition is a container element that repeats its contents (that is, everything between the <WEBOBJECT...> and </WEBOBJECT...> tags in the template file) a given number of times. You can use a WORepetition to create dynamically generated ordered and unordered lists or banks of check boxes or radio buttons.
6 +
5 5  = Usage =
6 6  
7 7  {{code}}
8 8  
11 +WORepetition {
12 + list=anObjectList;
13 + item=anIteratedObject;
14 + [index=aNumber;]...
15 +};
9 9  
17 +WORepetition {
18 + count=aNumber;
19 + [index=aNumber;]
20 +}
21 +
10 10  {{/code}}
11 11  
12 12  = Bindings =
13 13  
26 +| list | Array of objects that the WORepetition will iterate through. Ideally, this should be an immutable array. If you must pass a mutable array, your code must not alter the array while the WORepetition is iterating through it.
27 +| item | Current item in the list array. (This attribute's value is updated with each iteration.)
28 +| index | Index of the current iteration of the WORepetition. (This attribute's value is updated with each iteration.
29 +| count | Number of times this element will repeat its contents.
30 +
14 14  = Examples =
15 15  
16 16  == Java methods ==
... ... @@ -30,3 +30,5 @@
30 30  {{/code}}
31 31  
32 32  = Related documents =
50 +
51 +[[ERXWORepetition>>http:wocommunity.orgdocumentsjavadocwonderlatesterextensionscomponents_privateERXWORepetition.html]]