I'm a bit confused on scoping

  • I have an XPage with custom controls on it that renders a View, based on Dec’s XPages blog. In there, he creates links in the View table to load the document that table row refers to, and he does it by setting “documentID” to “rowData.getUniversalID”. This causes a “documentID=” URL parameter to appear.

  • So far this is all clear as air. No troubles at all.

  • On the XPage that loads from the link in the table row there is a dynamic binding to a static data source name. This is all done using the Data tab under properties, so it’s not like Dec is doing any razzle-dazzle. Straightforward XPages, it appears.

  • BUT the “Document ID” field in the Data Sources: Domino Document box says "rowData.getUniversalID().

  • How does the rowData instance from the previous page (remember we’ve loaded a completely new page, a document, in response to a click in the prior page, a table) work here? It does, because this is what Dec said to do (being a neophyte at xpages i followed blindly), and it’s been working for quite some time. But why?

  • Main reason I want to know is I thought: Hey, I’ve got a NotesViewEntry object right here on my document XPage. I can use that to do things. Yet every time I try to do things, it says “rowData” doesn’t exist. Yet … it’s right there. Weird, huh?

  • Thanks for enlightening me…

Code the Data tab generated, which works … the indicate document is loaded correctly


xp:this.data

<xp:dominoDocument var="dsRef" formName="someForm"documentId="rowData.getUniversalID()" action="openDocument" />

</xp:this.data>