データソースを繰り返すことによって、埋め込みコントロールを繰り返します。
カテゴリ
コンテナコントロール
構文
<xp:repeat attributes>
contol ...
</xp:repeat>
表 1. 必須プロパティプロパティ |
説明 |
id |
デフォルトは repeat1、repeat2 などです。 |
value |
通常、データバインディングは、
NotesDocumentCollection オブジェクトなど、要素の集まりに対して行われます。 |
var |
通常、この変数はバインドされたデータの集まりの中の 1 つのメンバーを参照します (例えば、バインディングが NotesDocumentCollection オブジェクトに対して行われている
場合は NotesDocument オブジェクト)。 |
使用法
実行時に、コントロールの繰り返されたコンテンツがページに
表示されます。 繰り返しコントロールのコンテンツ内で
var を使用して、データソースの各メンバーごとにそのコンテンツを繰り返します。
例
下の繰り返しコントロールは、現在のデータベースにあるすべての文書について、
subject 項目を表示します。
<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>