Wiki source code of WORepetition
Last modified by Pascal Robert on 2012/01/30 22:24
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
10.1 | 1 | {{toc/}} |
![]() |
3.1 | 2 | |
3 | = Introduction = | ||
4 | |||
![]() |
9.1 | 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 | |||
![]() |
3.1 | 7 | = Usage = |
8 | |||
9 | {{code}} | ||
10 | |||
![]() |
9.1 | 11 | WORepetition { |
12 | list=anObjectList; | ||
13 | item=anIteratedObject; | ||
14 | [index=aNumber;]... | ||
15 | }; | ||
![]() |
3.1 | 16 | |
![]() |
9.1 | 17 | WORepetition { |
18 | count=aNumber; | ||
19 | [index=aNumber;] | ||
20 | } | ||
21 | |||
![]() |
3.1 | 22 | {{/code}} |
23 | |||
24 | = Bindings = | ||
25 | |||
![]() |
10.1 | 26 | |((( |
27 | list | ||
28 | )))|((( | ||
29 | 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. | ||
30 | ))) | ||
31 | |((( | ||
32 | item | ||
33 | )))|((( | ||
34 | Current item in the list array. (This attribute's value is updated with each iteration.) | ||
35 | ))) | ||
36 | |((( | ||
37 | index | ||
38 | )))|((( | ||
39 | Index of the current iteration of the WORepetition. (This attribute's value is updated with each iteration. | ||
40 | ))) | ||
41 | |((( | ||
42 | count | ||
43 | )))|((( | ||
44 | Number of times this element will repeat its contents. | ||
45 | ))) | ||
![]() |
9.1 | 46 | |
![]() |
3.1 | 47 | = Examples = |
48 | |||
49 | == Java methods == | ||
50 | |||
51 | == WOD-style == | ||
52 | |||
![]() |
10.1 | 53 | {{code/}} |
![]() |
3.1 | 54 | |
55 | == Inline bindings (WOOGNL) == | ||
56 | |||
![]() |
10.1 | 57 | {{code/}} |
![]() |
3.1 | 58 | |
59 | = Related documents = | ||
![]() |
9.1 | 60 | |
![]() |
10.1 | 61 | ERXWORepetition (http:/wocommunity.org/documents/javadoc/wonder/latest/er/extensions/components/_private/ERXWORepetition.html) |