public void close() { super.close(Window.CLOSE_ACTION_ID, true); } }
/** * Tries to validate and commit data. If data committed successfully then closes the screen with * {@link #WINDOW_COMMIT_AND_CLOSE} action. May show validation errors or open an additional dialog before closing * the screen. * * @return result of close request */ public OperationResult closeWithCommit() { if (validateAll()) { boolean committed = commitInternal(true); if (committed) { return close(WINDOW_COMMIT_AND_CLOSE_ACTION); } } return OperationResult.fail(); }
.withCaption(messages.getMainMessage("actions.Cancel")) .withHandler(e -> close(commitActionPerformed ? Window.COMMIT_ACTION_ID : getId()) );