Forum

Jennifer Häfner
      Has successfully completed the online course Intermediate (200)
      Has successfully completed the online course Advanced (300)
      Has successfully completed the online course Basics (100)
      Has successfully completed the online course Advanced (310)
      Has successfully completed the online course Advanced (320)
      Has successfully completed the Intermediate Certification
      Has successfully completed the Advanced Certification
    3 years ago #29019
    Up
    0
    Down
    ::

    Hello Ishant,

    This error seems to occur because you are binding the tab items via a global variable (an array of objects). When pressing the ‘x’ button of a tab item, the ‘itemClose’ function (which is defined in the widget ‘TabContainer’) is triggered and removes the tab item.

    But when you remove the corresponding object from the global variable manually (by subscribing to the ‘itemClose’ event of the TabContainer in the Process Designer), the ‘itemClose’ function is triggered once again and produces the error because it cannot find the item since it has been removed before.

    So what you could do: in the widget ‘TabContainer’, adapt the ‘itemClose’ function.

    Instead of this part:

    if (this.fireItemClose({item: oRemovedItem})) {
    this.removeItem(oRemovedItem); // the tabstrip item will also get removed
    }

    add this code:

    this.fireItemClose({
    item: oRemovedItem
    });

    With this change, the binding via a global variable should work fine.