/** * 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() { return commitChanges() .compose(() -> close(WINDOW_COMMIT_AND_CLOSE_ACTION)); }