]> git.mxchange.org Git - addressbook-war.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Wed, 7 Oct 2015 11:21:03 +0000 (13:21 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 7 Oct 2015 11:21:03 +0000 (13:21 +0200)
- added new page resend_link.xhtml for resending confirmation link
- added language strings for above new page (all pages get at least 2 strings)
- forgot to clear userName property in bean
- better handle over whole User instance instead of "raw data"
- updated jar(s)
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/juser-core.jar
lib/juser-lib.jar
src/java/org/mxchange/addressbook/beans/register/UserRegisterWebBean.java
src/java/org/mxchange/addressbook/beans/user/UserWebBean.java
src/java/org/mxchange/addressbook/beans/user/UserWebController.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/faces-config.xml
web/WEB-INF/templates/guest/guest_menu.tpl
web/user/resend_link.xhtml [new file with mode: 0644]

index 791ee3aad7307d2f4534d23a9c5fe4d096d8d18b..cc3731c80a7e0f7cd3fb40011743ea015d4e3d38 100644 (file)
Binary files a/lib/juser-core.jar and b/lib/juser-core.jar differ
index 6457e8da888500c94b9123326010e72a82b0007a..394fea9303a74e3492b8053562a8bd56e103e1dd 100644 (file)
Binary files a/lib/juser-lib.jar and b/lib/juser-lib.jar differ
index 6edf2af6b60299a8e83bd215c90e60711297b8e0..b3a752814513099579b7c016d63a62dcc9248c02 100644 (file)
@@ -82,19 +82,19 @@ public class UserRegisterWebBean implements UserRegisterWebController {
                // Is the user already used?
                if (!this.userController.isRequiredPersonalDataSet()) {
                        // Not all required fields are set
-                       throw new FaceletException("Not all required fields are set.");
-               } else if (this.userController.isUserNameRegistered(user.getUserName())) {
+                       throw new FaceletException("Not all required fields are set."); //NOI18N
+               } else if (this.userController.isUserNameRegistered(user)) {
                        // User name is already used
                        throw new FaceletException(new UserNameAlreadyRegisteredException(user));
-               } else if (this.userController.isEmailAddressRegistered(user.getUserContact().getEmailAddress())) {
+               } else if (this.userController.isEmailAddressRegistered(user)) {
                        // Email address has already been taken
                        throw new FaceletException(new EmailAddressAlreadyRegisteredException(user));
                } else if (!this.userController.isSameEmailAddressEntered()) {
                        // Not same email address entered
-                       throw new FaceletException(new DataRepeatMismatchException(MessageFormat.format("Email addresses not matching: {0} != {1}", this.userController.getEmailAddress(), this.userController.getEmailAddressRepeat())));
+                       throw new FaceletException(new DataRepeatMismatchException(MessageFormat.format("Email addresses not matching: {0} != {1}", this.userController.getEmailAddress(), this.userController.getEmailAddressRepeat()))); //NOI18N
                } else if (!this.userController.isSamePasswordEntered()) {
                        // Not same password entered
-                       throw new FaceletException(new DataRepeatMismatchException("Passwords not matching."));
+                       throw new FaceletException(new DataRepeatMismatchException("Passwords not matching.")); //NOI18N
                }
 
                // Encrypt password
index ab9f5b6519f551cdd7e9df1f398d962f844d981c..fdf037dbd9f8524b57271bfae37db8ae380e13e6 100644 (file)
@@ -222,6 +222,7 @@ public class UserWebBean implements UserWebController {
                // - other data
                this.setBirthday(null);
                this.setComment(null);
+               this.setUserName(null);
                this.setUserPassword(null);
                this.setUserPasswordRepeat(null);
        }
@@ -491,8 +492,8 @@ public class UserWebBean implements UserWebController {
        }
 
        @Override
-       public boolean isEmailAddressRegistered (final String emailAddress) {
-               return ((this.emailAddressList instanceof List) && (this.emailAddressList.contains(emailAddress)));
+       public boolean isEmailAddressRegistered (final User user) {
+               return ((this.emailAddressList instanceof List) && (this.emailAddressList.contains(user.getUserContact().getEmailAddress())));
        }
 
        @Override
@@ -522,7 +523,7 @@ public class UserWebBean implements UserWebController {
        }
 
        @Override
-       public boolean isUserNameRegistered (final String userName) {
-               return ((this.userNameList instanceof List) && (this.userNameList.contains(userName)));
+       public boolean isUserNameRegistered (final User user) {
+               return ((this.userNameList instanceof List) && (this.userNameList.contains(user.getUserName())));
        }
 }
index b93bf1158bd3d5f970be8bf9b3638caddac023fd..a661d10e256f2fd1777b12d03f150fd03ecdbcbe 100644 (file)
@@ -321,12 +321,12 @@ public interface UserWebController extends Serializable {
        public void setZipCode (final Integer zipCode);
 
        /**
-        * Checks whether given email address is used
+        * Checks whether user instance's email address is used
         * <p>
-        * @param emailAddress Email address to check
+        * @param user User instance's email address to check
         * @return Whether it is already used
         */
-       public boolean isEmailAddressRegistered (final String emailAddress);
+       public boolean isEmailAddressRegistered (final User user);
 
        /**
         * Checks whether all required personal data is set
@@ -350,10 +350,10 @@ public interface UserWebController extends Serializable {
        public boolean isSamePasswordEntered ();
 
        /**
-        * Checks whether given user name is used
+        * Checks whether given user instance's name is used
         * <p>
-        * @param userName User name to check
+        * @param user User instance's name to check
         * @return Whether it is already used
         */
-       public boolean isUserNameRegistered (final String userName);
+       public boolean isUserNameRegistered (final User user);
 }
index 01d4628be7604d888feef53cb6152d12546dac32..3fff23d54406902ee83cb55fd9ce272bc04f1f5c 100644 (file)
@@ -113,3 +113,7 @@ GUEST_USER_REGISTRATION_COMPLETED=Die Anmeldung ist abgeschlossen und Ihr Accoun
 PERSONAL_DATA_COUNTRY_CODE=L\u00e4ndercode:
 PAGE_TITLE_USER_REGISTER_DONE=Anmeldung abgeschlossen
 SUB_TITLE_USER_REGISTER_DONE=Die Anmeldung ist abgeschlossen:
+PAGE_TITLE_INDEX_RESEND_LINK=Best\u00e4tigungslink erneut aussenden
+SUB_TITLE_INDEX_RESEND_LINK=Best\u00e4tigungslink anfordern:
+LINK_GUEST_RESEND_LINK=Best\u00e4tigungslink
+LINK_GUEST_RESEND_LINK_TITLE=Best\u00e4tigungslink erneut aussenden
index 761a88174bd0be5b4e2784d70e33ccad2d778364..bbb494656db38190f0e5740f24ba703364e750ac 100644 (file)
@@ -113,3 +113,7 @@ GUEST_USER_REGISTRATION_COMPLETED=The registration is completed and your account
 PERSONAL_DATA_COUNTRY_CODE=Country code:
 PAGE_TITLE_USER_REGISTER_DONE=Registration completed
 SUB_TITLE_USER_REGISTER_DONE=Registration is completed:
+PAGE_TITLE_INDEX_RESEND_LINK=Resend confirmation link
+SUB_TITLE_INDEX_RESEND_LINK=Request confirmation link:
+LINK_GUEST_RESEND_LINK=Confirmation link
+LINK_GUEST_RESEND_LINK_TITLE=Resend confirmation link
index 2078bf98f1b48902718bb5ce04a2c28592bf76c7..ab8b7f848533a6546ac20c3d56a1733c94255013 100644 (file)
                <from-outcome>login_index</from-outcome>
                <to-view-id>/login/index.xhtml</to-view-id>
            </navigation-case>
+           <navigation-case>
+               <from-outcome>resend_link</from-outcome>
+               <to-view-id>/user/resend_link.xhtml</to-view-id>
+           </navigation-case>
        </navigation-rule>
        <navigation-rule>
                <from-view-id>/admin/admin_logout.xhtml</from-view-id>
index e9369cca38826069b10066415fad19f387d4c901..c7c2389acf21795db41cd49ca33a6a56e441fb67 100644 (file)
@@ -24,6 +24,7 @@
                                <li><h:link title="#{msg.LINK_GUEST_LOGIN_TITLE}" outcome="user_login" value="#{msg.LINK_GUEST_LOGIN}" /></li>
                                <li><h:link title="#{msg.LINK_GUEST_REGISTER_TITLE}" outcome="user_register" value="#{msg.LINK_GUEST_REGISTER}" /></li>
                                <li><h:link title="#{msg.LINK_GUEST_PASSWORD_TITLE}" outcome="user_lost_passwd" value="#{msg.LINK_GUEST_PASSWORD}" /></li>
+                               <li><h:link title="#{msg.LINK_GUEST_RESEND_LINK_TITLE}" outcome="user_lost_passwd" value="#{msg.LINK_GUEST_RESEND_LINK}" /></li>
                        </ul>
                </div>
        </div>
diff --git a/web/user/resend_link.xhtml b/web/user/resend_link.xhtml
new file mode 100644 (file)
index 0000000..ebb62a4
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://java.sun.com/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core"
+         >
+
+       <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
+               <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_RESEND_LINK}</ui:define>
+
+               <ui:define name="menu">
+                       <ui:include id="menu" class="guest_menu" src="/WEB-INF/templates/guest/guest_menu.tpl" />
+               </ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.SUB_TITLE_INDEX_RESEND_LINK}
+               </ui:define>
+
+               <ui:define name="content">
+                       Here goes your content.
+               </ui:define>
+
+               <ui:define name="footer">
+                       <ui:include id="footer" class="guest_footer" src="/WEB-INF/templates/guest/guest_footer.tpl" />
+               </ui:define>
+       </ui:composition>
+</html>