title: Capture a document save conflict
body: <p>I have an xpage for a document which has concurrencyMode="fail". If the document suffers a save conflict it shows the error message "Document has been saved by another user - Save has not been performed" but continues to refresh the elements on the page, based on the front-end selection, rather than the saved data. I have a field which flags if the document is current, if this is set to 'No' then the 'Delete' button becomes visible. If the document is not saved due to a save conflict, this button is still rendered. </p>
  
  <p>The save conflict is caused by a back-end agent that runs post save, I have looked to see if there is a way for the agent to run without re-saving the document, but cannot find a way without changing the code dramatically.</p>
  
  <p>I feel the best way to avoid this problem would be to capture the fact that the save conflict occured and stop all processing at that point, possibly reloading the page so that the user can see the values as they are on the saved document, rather than what is on the screen. But I'm unsure how to achieve this.</p>