This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



May 15, 2012, 2:15 PM
94 Posts

Why do I get a save conflict when I save a document more than once?

  • Category: Debugging
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 2
I have a repeat control that returns an array of docids.  In the repeat, then, I have a panel bound to the docid for that row.  I have a save button within the panel to save that particular row.  The save works fine, no conflicts - however, the row is still editable after the save, so if the user makes another change and clicks Save again, then we get a save conflict and the last change is not saved to the document.
 
I can reproduce this easily.  I open the page, make a change to one of the rows and click Save.  Document is saved correctly.  I then make another change in the same panel and click Save again, and I get a save conflict.  If I make a 3rd change and click Save again - another save conflict.  Only the first change is saved to the good document, naturally.  The 2nd and 3rd changes are only saved in the conflict docs.
 
I tried setting concurrencymode=force to avoid the conflicts, but then the 2nd and 3rd changes don't get saved at all.

How do I allow the user to save more than once without getting save conflicts?
 
 
May 17, 2012, 9:48 PM
122 Posts
Re: Why do I get a save conflict when I save a document more than once?
Try setting the editability based on a viewScope variable containing the UNID of the document to be edited. On save, clear the ID and run a partial refresh, thus putting the document back to read mode.
 
The other thing to make sure of is that the relevant dominoDocument datasource is only referenced once on the XPage. It doesn't sound like that's happening, but that can cause save conflicts.
May 26, 2012, 12:22 PM
94 Posts
Re: Why do I get a save conflict when I save a document more than once?
Thanks for the idea, Paul.  I added a simple action to change the panel document to Read Mode after the save action, and also added an Edit button to the panel. 
 
However, it didn't change my outcome... the page opens with each row in edit mode by default.  When I make an edit and click Save, it saves the doc fine without conflict and puts the row in Read Mode.  However, when I click Edit, make another change and click Save, I still get a conflict document.
 
Conflict Handling on the associated Form is set to "Do Not Create Conflicts".
 
Any other ideas?
 
You mentioned that the "relevant document data source" should only be referenced once on the page.. but my data source is tied to a panel in a repeat control, so naturally, it is referenced as many times as the rows displayed in the repeat.  How do I get around that?

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal