protected boolean isCommitCloseAction(CloseAction closeAction) { return (closeAction instanceof StandardCloseAction) && ((StandardCloseAction) closeAction).getActionId().equals(Window.COMMIT_ACTION_ID); } }
protected boolean isCommitCloseAction(CloseAction closeAction) { return (closeAction instanceof StandardCloseAction) && ((StandardCloseAction) closeAction).getActionId().equals(Window.COMMIT_ACTION_ID); }
CloseAction closeAction = event.getCloseAction(); if (closeAction instanceof StandardCloseAction && ((StandardCloseAction) closeAction).getActionId().equals(Window.COMMIT_ACTION_ID)) { actualField.setValue(((ListEditorWindowController) screen).getValue());
@Override public void accept(AfterCloseEvent afterCloseEvent) { if (afterCloseEvent.getCloseAction() instanceof StandardCloseAction) { String actionId = ((StandardCloseAction) afterCloseEvent.getCloseAction()).getActionId(); closeListener.windowClosed(actionId); } else { closeListener.windowClosed(UNKNOWN_CLOSE_ACTION_ID); } } }
protected void openLookup(@Nullable Runnable afterLookupSelect) { Screen lookupScreen; if (lookupProvider == null) { lookupScreen = createLookupScreen(afterLookupSelect); } else { lookupScreen = lookupProvider.get(); if (!(LookupScreen.class.isAssignableFrom(lookupScreen.getClass()))) { log.info("Not suitable screen is returned from LookupScreen provider. Default implementation will be used"); lookupScreen = createLookupScreen(afterLookupSelect); } //noinspection unchecked ((LookupScreen<V>) lookupScreen).setSelectHandler(selected -> { handleLookupSelection(selected); if (afterLookupSelect != null) { afterLookupSelect.run(); } }); } lookupScreen.show(); if (afterLookupCloseHandler != null) { lookupScreen.addAfterCloseListener(event -> { String actionId = ((StandardCloseAction) event.getCloseAction()).getActionId(); afterLookupCloseHandler.onClose(event.getScreen().getWindow(), actionId); }); } }
CloseAction closeAction = event.getCloseAction(); if (closeAction instanceof StandardCloseAction) { closeActionId = ((StandardCloseAction) closeAction).getActionId();
((StandardCloseAction) closeAction).getActionId() : UNKNOWN_CLOSE_ACTION_ID;