If I search help for “concurrencyMode” I find nothing. If I search the web for “concurrencyMode XPage” I get precisely one hit concerning JDBC programming.
It seems to me concurrencyMode simply tells how to deal with save conflicts, which is not document locking. While the suggestion is an asset, a more concise answer would have been a greater asset. For instance:
“No, XPages do not support document locking, but you can tell it how to deal with save conflicts on a page-by-page basis using concurrencyMode.” (perhaps with the excellent capture to show precisely where to find it)
Note that if help actually was - help that is - “try using concurrencyMode” could have easily been a sufficiently concise answer.
So this doesn’t answer the actual question: Do XPages support document locking? A corollary to that, given how useless “help” is, would be where does one find information on employing document locking in XPages?
Lest ye think I believe clues are worthless, I did say it was an asset, as it does at least point in a direction, which is lightyears ahead of shooting in the dark.
Searching help for document AND locking in just the XPages areas turns up lock methods, so that implies XPages do support locking. I suspect it’s strictly server-side, but that is a far cry better than nothing.
More searching reveals that yes, locking is supported in XPages, and on the web in general, if it’s done right. Here’s a rundown:
If XPages has a better or different way I’d love to hear it. The solution above is the only idea I’d come up with, and it’s nice to find someone who’s done it, so it’s a solution and not an idea any longer.
And the “concurrencyMode” clue is an excellent clue. It did lead to finding an answer, as any good clue should. Bravo, Paul! Sadly the entire trail is also present.
I have managed to get a form of document locking working on an application and have written an article. Not a perfect solution, but it is getting there.
Subject: This can all be done at one time using SSJS…
The Notesy objects exposed in XPages do in fact work for locking and unlocking, just like they do for LS. So from a document locking standpoint one may do anything required with SSJS, and have all locking in one place. I do it in postOpenDocument because, per tradition, the data isn’t actually available for use in queryOpenDocument.- Unlocking is equally simple. The tricky part, on the web, is knowing when do to it.