@Override
      public void beforeSelectionChanged(TabInfo oldSelection, TabInfo newSelection) {
        if (oldSelection != null && !isStateBeingRestored()) {
          GridImpl grid = getGridFor(oldSelection);
          if (getTabFor(grid) != null) {
            grid.saveUiState();
          }
        }
      }
@Override
      public void beforeSelectionChanged(TabInfo oldSelection, TabInfo newSelection)