Vijayakumar
Vijayakumar

Reputation: 85

I Need to prevent saved conflict in xpage

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?

Upvotes: 1

Views: 873

Answers (3)

Paul Stephen Withers
Paul Stephen Withers

Reputation: 15729

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

Upvotes: 1

Per Henrik Lausten
Per Henrik Lausten

Reputation: 21709

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.

Upvotes: 4

Fredrik Norling
Fredrik Norling

Reputation: 3484

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.

Upvotes: 2

Related Questions