No announcement yet.
  • Filter
  • Time
Clear All
new posts

    Remove tab not working as expected

    Hi ,

    I need to implement the business logic in such a way ,
    • Close the tab based on background logic
    • Add the same tab whenever needed by menu driven approach

    From the (i) specification, while closing the tab the near by tab are getting blank canvas.

    If this is an attempt to report a framework issue, you need to provide a way to reproduce this rather than just a screenshot of your application not working. But at a guess, you are probably trying to remove the tab, which is in the middle of handling a click event, and that would be invalid and is reported to you in the Developer Console. Instead, call markForDestroy(), and also select some other tab.


      antonychristopher I think you're experiencing a peculiarity with how the removeTab function works. In the docs it says:
      RemoveTab : The pane associated with the removed tab is automatically destroyed when you call this method. To avoid this, call with null as the new pane immediately before removing the tab

      This should work: tabSet.setDestroyPanes(false);

      Or I think something like this should work :
      comboBoxItem.addChangedHandler(new ChangedHandler() {
      public void onChanged(ChangedEvent event) {
      if (Arrays.asList(tabSet.getTabs()).contains(customTab)) {
      tabSet.updateTab(customTab, null);
      } else {

      Last edited by Stefanie; 1 Apr 2018, 06:00.