1
votes

Scenario :- I opened the same document in different browsers(users). One user modified and saved the document. another user also modifying the same document which creates saved conflicts. for this I googled and found the link and tried.

http://dontpanic82.blogspot.in/2010/01/xpages-custom-control-that-can-help.html (Thanks to Mr Tommy).

I included this custom control in another custom control(Form) at the end of Cc. I am getting currentDocument not found in before render response event. I have my data source name document which is defined for full page not for panel.

Document handle is not getting in Before render response event?

Please help to me to solve this. or is there any other way to prevent saved conflicts?

3
I've upvoted to draw attention to this question as replication conflicts are generally poorly understood. It should n't however be possible, at the design level for two users to concurrently edit the same document, in the web or in Lotus Notes. One of the edits will lose.AndrewB
Dear ArdrewB, As Pen Hendrik suggested, I set the concurrency mode for the datasource . So It is working fine now.Vijayakumar

3 Answers

4
votes

Have a look at the concurrencyMode property of the document datasource.

You can for instance set it to fail in order for the document save to stop (fail) if a save conflict occurs. If you have (or add) a message control to your xpage, a save conflict error message will then appear.

2
votes

If you isn't building for XPinc you could use my Document locker project on openntf.org

Document Locker on openntf.org

It works like this, when a user opens a document a< lock is added to an application scope bean. And when the user exits the document this lock is removed. if another user tried to enter the document at the same time they will be redirected to readmode.

1
votes

Also, check the section in Mastering XPages 2nd Edition about document locking. That gives thorough examples for enabling the in-built Domino document locking.