1
votes

I have an XPage that displays fields in a document. I also have the ability to pop out a new window that displays those same fields. I'm implementing a document locking scheme so that the two instances can't cause conflicts (and this is how I'm testing it).

A problem I've run into is that when the user edits the document in the pop out and saves it, a partial refresh of the panel containing those same fields in the original page doesn't show the updated data.

The save in the pop out was successful, and I can see in the Notes client that the document does indeed have the new value, but the original page simply won't show the new value. A complete page refresh using the reload button in the browser works, but I'd like to trigger this programmatically and as quickly as possible, hence the partial refresh.

Does anyone know what is going wrong? Is the NotesXspDocument in the original page getting out of sync with the backend document? I read about document1.getDocument(true), but that doesn't seem to do anything.

(As usual, I can't supply source code unfortunately....)

1
Source code is needed. Is the "pop out" a new browser window or a dialog within the same browser window? Are you using the xsp document when updating the fields in the pop out? Please show us what you do (you can remove code and make the example generic). - Per Henrik Lausten
The bit about the pop out is my current scenario, but it's probably just a distraction. You could as easily imagine two different user on two different computers, both looking at a document; one edits and saves it, and I'd like the other's document to be able to refresh and display the new changes. Apparently there's no way to do this programmatically other than reloading the page. - Reid Rivenburgh

1 Answers

3
votes

Once the NotesXspDocument is loaded with the XPage, a partial refresh does not update the xspDoc from the back-end DB, but from the in-memory DataSource.

You will need to refresh the XPage: Reload the url from browser or in ssjs with a context.reloadPage()