}
private User createNewUserForBinding() {
String loginName = loginNameTextbox.getValue();
if (StringUtils.isBlank(loginName)) {
throw new WrongValueException(loginNameTextbox,
_("cannot be empty"));
}
String password = passwordTextbox.getValue();
if (StringUtils.isBlank(loginName)) {
throw new WrongValueException(passwordTextbox,
_("cannot be empty"));
}
String passwordConfirmation = passwordConfirmationTextbox.getValue();
if (!password.equals(passwordConfirmation)) {
throw new WrongValueException(passwordConfirmationTextbox,
_("passwords do not match"));
}
String encodedPassword = dbPasswordEncoderService.encodePassword(
password, loginName);