Hello CUBA team!
I’m altering the user registration sample project to require the user to check his/her email to activate the account. One simple step that isn’t working as required is showing the “Check your email” screen I’ve created as a blank screen. The Register screen is a modal, and I’m attempting to redirect from it as a full screen:
try {
registrationService.registerUser(getFirstName(), getLastName(), getOrganization(), getPhoneNumber(), getEmail(), getLogin(), getPassword(), getConfirmPassword());
CheckEmailScreen checkEmailScreen = screens.create(CheckEmailScreen.class);
notifications.create(Notifications.NotificationType.TRAY)
.withCaption("Created user " + getLogin())
.show();
close(WINDOW_COMMIT_AND_CLOSE_ACTION);
checkEmailScreen.show();
} catch (MethodParametersValidationException e) {
List<String> messages = e.getConstraintViolations().stream()
.map(ConstraintViolation::getMessage)
.collect(Collectors.toList());
String message = Joiner.on("\n").join(messages);
notifications.create(Notifications.NotificationType.TRAY)
.withCaption(message)
.show();
}
This opens the new CheckEmailScreen in a modal as well. I’m hoping to discover a way to redirect from the registration modal to the new screen in a full window (check-email-screen.xml) which shows the message. Any ideas?
Thanks in advance. You all are great!
Adam