XPages: Issue with Tabs and multiple datasources

In my current project I try to open documents from a view in a tab. Each document should open in a new tab. I’m using the extensionLib from OpenNTF ( 2011-04-10 ). This is working so far and I can access data from the underlying document and display in the tab.

But I want to display also data from at least 2 different documents that are related to the main document. This also works on a XPage, but not in the tab container.

I have 3 datasources on a custom control that is loaded, when a new tab is generated

 

 

The issue I’m fighting with at the moment is that for example “docCRMLocation” returns docCRMPerson as the Object Dump, while the computed field returns the correct UNID for the location.

Also using

var docCRMLocation:NotesDocument = database.getDocumentByUNID(getDocUNID(docCRMPerson.getItemValue(‘ID’),1));

returns the correct documemt. Anyone an idea what is going on? Or am I doing it completely wrong? Any help is appreciated.