<foreach> element

Appears in: many

An element that renders its body repeatedly, much like a Foreach component. An expression supplies a collection or array of objects, and its body is rendered for each element in the collection.

Figure D.2. <foreach> Attributes

NameTypeRequired ?Default ValueDescription
keystringyes The symbol to be updated with each successive value.
expressionstringyes The OGNL expression which provides the source of elements.
indexstringno If specified, then the named symbol is updated with each successive index.

Figure D.3. <foreach> Elements


  (text | <foreach> | <if> | <if-not> | <unique>) *