A repeat control can be used to display the contents of a collection similar to a viewPanel or dataView, however it is a lot more customizable as you can place whatever you want in side. It also just takes an array to specify how many
elements it will display so it can be used for other purposes also.
e.g. This will render 5 labels on the webpage with the text "Test"
<xp:repeat value="new Array(5)">
<xp:label value="test"></xp:label>
</xp:repeat>
e.g. where subteamArray is an array of strings the below will use the repeat variable "rowData" to pull out each item of the array and display it in a label
<xp:repeat value="subteamArray" var="rowData">
<xp:label value="rowData"></xp:label>
</xp:repeat>
You can put any control you like inside the repeat and it will display X number of those where X is the length of the array / collection passed into the value attribute. The Discussion template uses one of these in the "viewTopic" custom control to display a list of replies to a document. It would be helpful to you to view this code to see how it works