@UiHandler("devicesTabs") public void onDeviceTabClosed(CloseEvent<Widget> event) { for (Map.Entry<Long, ArchivePanel> entry : archivePanels.entrySet()) { if (entry.getValue().getContentPanel().equals(event.getItem())) { Device device = deviceStore.findModelWithKey(entry.getKey().toString()); archiveHandler.onClear(device); archivePanels.remove(entry.getKey()); break; } } }