Repeats embedded controls by iterating through a data source.
Category
Container Controls
Syntax
<xp:repeat attributes>
contol ...
</xp:repeat>
Table 1. Essential properties
Property |
Description |
id |
Defaults to repeat1 , repeat2 ,
and so on. |
value |
Typically the data binding is to a
collection of elements, for example, a NotesDocumentCollection object. |
var |
Typically this variable refers to one
member of the bound data collection, for example, a NotesDocument object
if the binding is to a NotesDocumentCollection object. |
Table 2. All properties
Category |
Properties |
accessibility |
role |
basics |
attrs, binding, dir, id, lang, loaded, removeRepeat, rendered, rendererType, repeatControls, rowAttrs |
data |
first, indexVar, rows, value, var |
styling |
disableTheme, style, styleClass, themeId |
Usage
At run time, the repeated content of
the control appears on the page. Use var in the content of the
repeat control to repeat the content for each member of the data source.
Examples
This repeat control displays the
subject
items
for all documents in the current database.
<xp:repeat id="repeat1" rows="30"
value="#{javascript:return database.getAllDocuments()}" var="rowdoc"
repeatControls="true">
<xp:text escape="true" id="computedField1">
<xp:this.value>
<![CDATA[#{javascript:return rowdoc.getItemValueString("subject") + " "}]]>
</xp:this.value>
</xp:text>
</xp:repeat>