From 79f905a6b864ec8bc833d858588e0e2aed9e6fd4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 24 May 2016 17:11:11 +0200 Subject: [PATCH] this.clear(); needs to be called to remove the email address from form. --- .../resendlink/PizzaResendLinkWebSessionBean.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkWebSessionBean.java index f7062386..a023fe82 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkWebSessionBean.java @@ -49,7 +49,7 @@ public class PizzaResendLinkWebSessionBean extends BasePizzaController implement private static final long serialVersionUID = 186_078_724_659_153L; /** - * Email address 1 (changing) + * Email address */ private String emailAddress; @@ -102,16 +102,25 @@ public class PizzaResendLinkWebSessionBean extends BasePizzaController implement // Is the email address really not used? user = this.userController.lookupUserByEmailAddress(this.getEmailAddress()); } catch (final UserEmailAddressNotFoundException ex) { + // Always clear bean + this.clear(); + // Not found, should not happen as the registered validator should find it throw new FaceletException(MessageFormat.format("this.emailAddress={0} should be resolveable into User instance.", this.getEmailAddress()), ex); //NOI18N } // Is the user account already confirmed? if (user.getUserAccountStatus() == UserAccountStatus.CONFIRMED) { + // Always clear bean + this.clear(); + // Then abort here this.showFacesMessage("form_resend_link:resendEmailAddress", new UserStatusConfirmedException(user)); //NOI18N return ""; //NOI18N } else if (user.getUserAccountStatus() == UserAccountStatus.LOCKED) { + // Always clear bean + this.clear(); + // User account is locked this.showFacesMessage("form_resend_link:resendEmailAddress", new UserStatusLockedException(user)); //NOI18N return ""; //NOI18N -- 2.39.5