void (final ActionCallback callback, final K key) { ModalityState modality = ModalityState.stateForComponent(this); ApplicationManager.getApplication().executeOnPooledThread(() -> { if (!myDisposed) { final UI ui1 = prepare(key); ApplicationManager.getApplication().invokeLater(() -> { if (!myDisposed) { select(callback, key, ui1); } else callback.setRejected(); }, modality); } else callback.setRejected(); }); }