isLocked vs isEditMode

Hi,

In my application, by javascript, I need to know if my opened ItemType is in "Edit" mode or not to enable or disable some html widgets.

In ARAS 11, I used document.thisItem.isLocked() to know that.

In ARAS 12, with the same code, the behavior is the following one:

  • When the ItemType is not claimed: FALSE ==> This is the expected behavior
  • When the ItemType is in "Edit" mode: TRUE ==> This is the expected behavior
  • When the ItemType is not in "Edit" mode but claimed: TRUE ==> This is NOT the expected behavior

So, isLocked is not good method to know if the ItemType is in "Edit" mode or not.

My question:
What is the javascript method to use on an ItemType to know is the "edit" mode is enabled ?

Parents
  • Hi,

    I found the solution. Instead of using document.thisItem.isLocked(), I use document.thisItem.getAttribute("isEditState", "0") === "0".

    isLocked is interesting just to know if the item is claimed or not and to know if this by you or not. It's only useful in very rare cases.
    The property isEditState is interesting to know if your item is in edit mode or not. It's useful in much more cases.
    This is better because now, I don't have buttons or fields enabled on item just claimed but not in edit mode.
     
    But I have another issue that I tried to summary in this schema:
    As you can see, I don't have the same state if I go through (1) or (2)+(3).
    I didn't find even triggered when we go from "claimed" to "edit".
    Do you know a solution on ARAS 12 ?
Reply
  • Hi,

    I found the solution. Instead of using document.thisItem.isLocked(), I use document.thisItem.getAttribute("isEditState", "0") === "0".

    isLocked is interesting just to know if the item is claimed or not and to know if this by you or not. It's only useful in very rare cases.
    The property isEditState is interesting to know if your item is in edit mode or not. It's useful in much more cases.
    This is better because now, I don't have buttons or fields enabled on item just claimed but not in edit mode.
     
    But I have another issue that I tried to summary in this schema:
    As you can see, I don't have the same state if I go through (1) or (2)+(3).
    I didn't find even triggered when we go from "claimed" to "edit".
    Do you know a solution on ARAS 12 ?
Children
No Data