WORepetition

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

Introduction

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.

Usage


WORepetition {
  list=anObjectList;
  item=anIteratedObject;
  [index=aNumber;]...
};

WORepetition {
 count=aNumber;
  [index=aNumber;]
}

Bindings

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.

item

Current item in the list array. (This attribute's value is updated with each iteration.)

index

Index of the current iteration of the WORepetition. (This attribute's value is updated with each iteration.

count

Number of times this element will repeat its contents.

Examples

Java methods

WOD-style

Inline bindings (WOOGNL)

Related documents

ERXWORepetition (http:/wocommunity.org/documents/javadoc/wonder/latest/er/extensions/components/_private/ERXWORepetition.html)