ActionCallback () { if (isStateBeingRestored()) return ActionCallback.REJECTED; try { setStateIsBeingRestored(true, this); List<TabInfo> tabs = new ArrayList<>(myTabs.getTabs()); final ActionCallback result = new ActionCallback(tabs.size()); for (TabInfo each : tabs) { getGridFor(each).restoreLastUiState().notifyWhenDone(result); } return result; } finally { setStateIsBeingRestored(false, this); } }