Runtime Error: Pager is not associated with any data control

I have a pager in a custom control associated with a repeat control, yet the page throws a runtime error claiming the pager is not associated with any data control.

Repeat control works great without the pager. I’ve reproduced the problem by creating a very simple control with a repeat and pager from the same datasources, same issue.

Here is the source:

<?xml version="1.0" encoding="UTF-8"?>

<xp:view xmlns:xp=“http://www.ibm.com/xsp/core”>

<xp:this.data>

	<xp:dominoView var="accountsByAM" viewName="AccountsByAM"></xp:dominoView>

</xp:this.data>

<xp:table>

	<xp:tr>

		<xp:td>

			<xp:pager layout="Previous Group Next" id="pager1" for="repeat1"></xp:pager>

		</xp:td>

	</xp:tr>

	<xp:tr>

		<xp:td>

			<xp:repeat id="repeat1" rows="30" repeatControls="true"

				first="1" var="docids" indexVar="index">

				<xp:panel>

					<xp:this.data>

						<xp:dominoDocument var="document1"

							action="openDocument" formName="Account"

							documentId="#{javascript:docids}">

						</xp:dominoDocument>

					</xp:this.data>

					<xp:text escape="true" id="computedField1" value="#{document1.name}"></xp:text></xp:panel>

				<xp:this.value><![CDATA[#{javascript:var dc:NotesDocumentCollection = accountsByAM.getAllDocumentsByKey(sessionScope.user_initials)

var vlines = new Array()

for (var i=1; i < dc.getCount(); i++) {

var doc:NotesDocument = dc.getNthDocument(i)

vlines[i-1] = doc.getNoteID()

}

@Explode(vlines)

}]]></xp:this.value>

			</xp:repeat>

		</xp:td>

	</xp:tr>

</xp:table>

</xp:view>

Also, I have other applications with a similar configuration that work fine on the same server, I’m at a loss as to what might be causing this, any ideas would be appreciated?

Subject: solved

Not sure if this is feature or BUG as I’m really not clear what this option does exactly, but if you have the repeat control set to “create controls at page creation”, you will get this error if you attempt to bind a pager to the repeat control.

Just wanted to share to perhaps save someone a lot of time in the future working it out on their own.

Subject: Thx Brian. Saved me lot of time :slight_smile: