XPages - compose response - embedded view empty

I am trying to compose a response document, that has an embedded view on it. I have it working fine opening existing documents. But when I compose a new one, the view is just empty. Has anyone come across anything like this?

My compose is an onclick simple action on a Link control. I compute the Parent ID to .getNoteId, and it creates a response doc in the right place when saved.

My only problem is the embedded view - it works fine when opening existing docs, but is empty when composing new docs.

(The embedded view is actually a folder in another database (that was fun enough! can we select a folder for View Control Data Source in 8.5.1?), but I’ve experimented and a plain view in the same database has the same issue)

Any suggestion greatly appreciated!

Subject: View Control on new response doc

Has anyone gotten a View Control on a new response doc to show any entries? Is it just me?

I made another button to compose the same form as a plain top level doc, and the View Control fills up normally. It’s just when created with a “Create Response Document” simple action that the view comes out empty. Opening existing docs works perfectly.

Driving me nuts!! Is there some other way to create a response doc that I can try?

Subject: same problem

Hi,

i have the same problem since a few weeks ago.

i don’t think that this is a problem of the built-in function. i also created a response document with client-side js (“window.open…”)

→ same behaviour

I also tried to save the doc directly after the creation, but unfortunately that also doesn’t work.

Subject: workaround solution

Hi,

i have a solution, which is pretty dirty, but it works. You have to save and reopen the document.

My way to do this is in the beforepageload event.

you need a construct like this:

if(document.isNewNote()){

document.save();

var page = “$$OpenDominoDocument.xsp?documentId=” + document.getDocument().getUniversalID() + “&action=openDocument”;

context.redirectToPage(page);

}