10 Replies Latest reply on Sep 20, 2013 11:21 PM by abollu

    RowInconsistentException does not show for the 2nd time




      I have a simple page with a few input fields and a save button.

      The input fields are derived from a ViewObject based on a single Entity Object.

      I open the page in two browsers. I follow the below steps:

      1) make changes in first browser

      2) make change in second browser

      3) save changes in first browser - it is successful

      4) click on save on second browser - a RowInconsistentException is thrown

      5) click on save again in the second browser - the changes gets saved, I was expecting the exception to be thrown again, but it is not thrown.


      I tried debugging it by printing the posted attributes (Entitiy.getPosetdAttribute()) before saving.

      On step-4 the posted attributes are different then the ones in DB, so the exception is thrown, that is fine.

      But on step-5 the posted attributes are same as the ones in the DB, (it looks like they are updated from the DB again on step-4) and the exception is not thrown.


      But in my page I want the save in step-5 to fail so that the user has to requery the page. How can I do that?


      Any Idea!!