]> git.mxchange.org Git - addressbook-war.git/commitdiff
this.clear(); needs to be called to remove the email address from form.
authorRoland Häder <roland@mxchange.org>
Tue, 24 May 2016 15:11:11 +0000 (17:11 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 25 May 2016 18:41:56 +0000 (20:41 +0200)
src/java/org/mxchange/addressbook/beans/resendlink/AddressbookResendLinkWebSessionBean.java

index c2c086536b64831c08979c19d1e7b09a777133b4..6e5b1356ea2269f7c18616d93552c09ca53d9362 100644 (file)
@@ -49,7 +49,7 @@ public class AddressbookResendLinkWebSessionBean extends BaseAddressbookControll
        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 AddressbookResendLinkWebSessionBean extends BaseAddressbookControll
                        // 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