]> git.mxchange.org Git - jjobs-war.git/commitdiff
Continued with user profile data:
authorRoland Haeder <roland@mxchange.org>
Sat, 5 Mar 2016 15:09:36 +0000 (16:09 +0100)
committerRoland Haeder <roland@mxchange.org>
Sat, 5 Mar 2016 15:12:53 +0000 (16:12 +0100)
- renamed changeFoo() to doChangeFoo() to match with naming convention
- added doChangePersonalData() which throws a checked exception
- that method does currently only check if the user is logged-in and if the password matches
- the resulting error message would be not user-friendly, so better added a validator which outputs a new localizable message
- added method ifCurrentPasswordMatches() which uses UserUtils to validate the entered password
- renaming interface applied
- updated juser-core.jar
- added jcoreee.jar

20 files changed:
lib/jcoreee.jar [new file with mode: 0644]
lib/juser-core.jar
nbproject/build-impl.xml
nbproject/faces-config.NavData
nbproject/genfiles.properties
nbproject/project.properties
nbproject/project.xml
src/java/org/mxchange/jjobs/beans/country/CountryWebApplicationBean.java
src/java/org/mxchange/jjobs/beans/login/UserLoginWebSessionBean.java
src/java/org/mxchange/jjobs/beans/login/UserLoginWebSessionController.java
src/java/org/mxchange/jjobs/beans/user/UserWebSessionBean.java
src/java/org/mxchange/jjobs/beans/user/UserWebSessionController.java
src/java/org/mxchange/jjobs/converter/country/CountryConverter.java
src/java/org/mxchange/jjobs/validators/password/UserPasswordValidator.java [new file with mode: 0644]
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/login/login_enter_current_password.tpl
web/WEB-INF/templates/login/login_footer.tpl
web/login/login_change_personal_data.xhtml

diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar
new file mode 100644 (file)
index 0000000..8fa7868
Binary files /dev/null and b/lib/jcoreee.jar differ
index 40c22b79f6b40e7f73ff091d16431972e436bbce..dab758462c35b87a226d553d9ae55630dad262db 100644 (file)
Binary files a/lib/juser-core.jar and b/lib/juser-core.jar differ
index 1804cc32e870881cd0c4d1242985d1d9a518e020..226dc27ed10db972c7ef10b8bce9ae75b1e93842 100644 (file)
@@ -1033,6 +1033,7 @@ exists or setup the property manually. For example like this:
         <copyfiles files="${file.reference.jcontacts-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jcore.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jcore-logger-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+        <copyfiles files="${file.reference.jcoreee.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jcountry-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jcountry-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jphone-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
@@ -1046,6 +1047,7 @@ exists or setup the property manually. For example like this:
         <copyfiles files="${file.reference.jcontacts-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jcore.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jcore-logger-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+        <copyfiles files="${file.reference.jcoreee.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jcountry-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jcountry-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jphone-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
index 14f4031113f5e5e0e47671d363914ca8515ec4a4..9a3038d34e4a84753789d4a5179074b68ab18f21 100644 (file)
@@ -2,25 +2,24 @@
 <Scene Scope="Project" version="2">
     <Scope Scope="Faces Configuration Only"/>
     <Scope Scope="Project">
-        <Node id="login/login_edit_address.xhtml" x="900" y="150" zoom="true"/>
-        <Node id="login/login_change_password.xhtml" x="1400" y="150" zoom="true"/>
         <Node id="privacy.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="login/login_change_password.xhtml" x="1400" y="150" zoom="true"/>
         <Node id="user/register.xhtml" x="400" y="600" zoom="true"/>
         <Node id="login/login_all_applications.xhtml" x="650" y="150" zoom="true"/>
         <Node id="login/login_index.xhtml" x="650" y="300" zoom="true"/>
         <Node id="user/resend_link.xhtml" x="150" y="750" zoom="true"/>
         <Node id="login/login_add_addressbook.xhtml" x="900" y="600" zoom="true"/>
         <Node id="login/login_own_addressbooks.xhtml" x="1650" y="150" zoom="true"/>
-        <Node id="terms.xhtml" x="150" y="150" zoom="true"/>
         <Node id="admin/admin_logout.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="terms.xhtml" x="150" y="150" zoom="true"/>
         <Node id="user/user_list.xhtml" x="900" y="300" zoom="true"/>
         <Node id="bye.xhtml" x="650" y="750" zoom="true"/>
         <Node id="index.xhtml" x="400" y="450" zoom="true"/>
         <Node id="user/register_done.xhtml" x="1400" y="300" zoom="true"/>
-        <Node id="login/login_change_personal_data.xhtml" x="150" y="300" zoom="true"/>
         <Node id="user/user_profile.xhtml" x="1150" y="450" zoom="true"/>
-        <Node id="imprint.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="login/login_change_personal_data.xhtml" x="150" y="300" zoom="true"/>
         <Node id="user/show_addressbook.xhtml" x="650" y="600" zoom="true"/>
+        <Node id="imprint.xhtml" x="1150" y="300" zoom="true"/>
         <Node id="*" x="150" y="900" zoom="true"/>
         <Node id="user/login_error.xhtml" x="1150" y="150" zoom="true"/>
         <Node id="user/show_addressbook_entries.xhtml" x="400" y="900" zoom="true"/>
index 224aeea47ad423af787fda99ab1c107cc1734ac0..5eb7f85f8bd55efc2f47a0f85ffb0b1a2077bd0e 100644 (file)
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=fafbc183
+build.xml.data.CRC32=b9ff954e
 build.xml.script.CRC32=fae72669
 build.xml.stylesheet.CRC32=651128d4@1.75.1.1
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=fafbc183
-nbproject/build-impl.xml.script.CRC32=d40bda24
+nbproject/build-impl.xml.data.CRC32=b9ff954e
+nbproject/build-impl.xml.script.CRC32=fca932bd
 nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.75.1.1
index afaedba9967f0d597df06de3906ad60e34910375..5179696be359541dc0db6af2df7443e88a6149be 100644 (file)
@@ -38,6 +38,7 @@ excludes=
 file.reference.jcontacts-core.jar=lib/jcontacts-core.jar
 file.reference.jcore-logger-lib.jar=lib/jcore-logger-lib.jar
 file.reference.jcore.jar=lib/jcore.jar
+file.reference.jcoreee.jar=lib/jcoreee.jar
 file.reference.jcountry-core.jar=lib/jcountry-core.jar
 file.reference.jcountry-lib.jar=lib/jcountry-lib.jar
 file.reference.jphone-core.jar=lib/jphone-core.jar
@@ -60,6 +61,7 @@ javac.classpath=\
     ${file.reference.jcontacts-core.jar}:\
     ${file.reference.jcore.jar}:\
     ${file.reference.jcore-logger-lib.jar}:\
+    ${file.reference.jcoreee.jar}:\
     ${file.reference.jcountry-core.jar}:\
     ${file.reference.jcountry-lib.jar}:\
     ${file.reference.jphone-core.jar}:\
@@ -108,6 +110,7 @@ source.encoding=UTF-8
 source.reference.jcontacts-core.jar=../jcontacts-core/src/
 source.reference.jcore-logger-lib.jar=../jcore-logger-lib/src/
 source.reference.jcore.jar=../jcore/src/
+source.reference.jcoreee.jar=../jcoreee/src/
 source.reference.jcountry-core.jar=../jcountry-core/src/
 source.reference.jcountry-lib.jar=../jcountry-lib/src/
 source.reference.jphone-core.jar=../jphone-core/src/
index f150bf9c81fa54c5e19014710c9076577772dc95..352befef12e5ebdae540ecb61864f0685993cd8f 100644 (file)
                     <file>${file.reference.jcore-logger-lib.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
+                <library dirs="200">
+                    <file>${file.reference.jcoreee.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
                 <library dirs="200">
                     <file>${file.reference.jcountry-core.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
index 41d682b5d67cbfc6ffca2b407c357d036bc7e8db..08811e2d05e024c385e98558da8e9444cb6155b3 100644 (file)
@@ -25,8 +25,8 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-import org.mxchange.jcountry.data.AddressbookCountrySingletonBeanRemote;
 import org.mxchange.jcountry.data.Country;
+import org.mxchange.jcountry.data.JobsCountrySingletonBeanRemote;
 
 /**
  * A country bean
@@ -45,7 +45,7 @@ public class CountryWebApplicationBean implements CountryWebApplicationControlle
        /**
         * Remote country EJB
         */
-       private AddressbookCountrySingletonBeanRemote countryBean;
+       private JobsCountrySingletonBeanRemote countryBean;
 
        /**
         * List of all countries
@@ -62,7 +62,7 @@ public class CountryWebApplicationBean implements CountryWebApplicationControlle
                        Context context = new InitialContext();
 
                        // Try to lookup the bean
-                       this.countryBean = (AddressbookCountrySingletonBeanRemote) context.lookup("ejb/jjobs-singleton-country"); //NOI18N
+                       this.countryBean = (JobsCountrySingletonBeanRemote) context.lookup("ejb/jjobs-singleton-country"); //NOI18N
                } catch (final NamingException ex) {
                        // Continue to throw
                        throw new FaceletException(ex);
index 449e4e6027006cfa168acc43dfa1753ee3f370ad..4a9c1edf6fc26b7def2d09652efe021ed254a4bc 100644 (file)
@@ -37,6 +37,7 @@ import org.mxchange.jusercore.exceptions.UserStatusLockedException;
 import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException;
 import org.mxchange.jusercore.model.login.UserLoginSessionBeanRemote;
 import org.mxchange.jusercore.model.user.User;
+import org.mxchange.jusercore.model.user.UserUtils;
 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
 
@@ -138,6 +139,24 @@ public class UserLoginWebSessionBean implements UserLoginWebSessionController {
                }
        }
 
+       @Override
+       public boolean ifCurrentPasswordMatches () {
+               // The current password must be set and not empty
+               if (this.getCurrentPassword() == null) {
+                       // Is not set
+                       throw new NullPointerException("this.currentPassword is null"); //NOI18N
+               } else if (this.getCurrentPassword().isEmpty()) {
+                       // Is set empty
+                       throw new IllegalStateException("this.currentPassword is empty."); //NOI18N
+               }
+
+               // Create "container"
+               LoginContainer container = new UserLoginContainer(this.getLoggedInUser(), this.getCurrentPassword());
+
+               // Now check if it matches
+               return UserUtils.ifPasswordMatches(container, this.getLoggedInUser());
+       }
+
        @Override
        public String getCurrentPassword () {
                return currentPassword;
@@ -195,7 +214,6 @@ public class UserLoginWebSessionBean implements UserLoginWebSessionController {
 
                // Trace message
                // NOISY-DEBUG System.out.println(MessageFormat.format("UserLoginWebSessionBean:isUserLoggedIn: this.userLoggedIn={0} - EXIT!", this.userLoggedIn));
-
                // Return it
                return this.userLoggedIn;
        }
index b1454d39a63595ce8ab11dfeb283628ff8e38310..4cf2358aa894431eb550f699e6c670e062b5a429 100644 (file)
@@ -95,4 +95,12 @@ public interface UserLoginWebSessionController extends Serializable {
         * @return Current password
         */
        String getCurrentPassword ();
+
+       /**
+        * Checks whether the (previously entered) current password matches with from
+        * the user instance.
+        * <p>
+        * @return If current password matches
+        */
+       boolean ifCurrentPasswordMatches ();
 }
index bb122ea7770f9a73b4259800830506d43d0999c9..61363cfd1e658d5d391a4bd24e150c8f2f3dceb1 100644 (file)
@@ -47,6 +47,7 @@ import org.mxchange.jphone.phonenumbers.smsprovider.SmsProvider;
 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
+import org.mxchange.jusercore.exceptions.UserPasswordMismatchException;
 import org.mxchange.jusercore.model.user.LoginUser;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.UserSessionBeanRemote;
@@ -66,7 +67,6 @@ public class UserWebSessionBean implements UserWebSessionController {
         */
        private static final long serialVersionUID = 542_145_347_916L;
 
-       /////////////////////// Properties /////////////////////
        /**
         * Birth day
         */
@@ -238,6 +238,18 @@ public class UserWebSessionBean implements UserWebSessionController {
                }
        }
 
+       @Override
+       public void doChangePersonalData () throws UserPasswordMismatchException {
+               // This method shall only be called if the user is logged-in
+               if (!this.loginController.isUserLoggedIn()) {
+                       // Not logged-in
+                       throw new IllegalStateException("User is not logged-in"); //NOI18N
+               } else if (!this.loginController.ifCurrentPasswordMatches()) {
+                       // Password not matching
+                       throw new UserPasswordMismatchException(this.loginController.getLoggedInUser());
+               }
+       }
+
        @Override
        public void afterRegistrationEvent (final @Observes UserRegisteredEvent event) {
                // Trace message
index 9917eab5874688e77240099796385f4e7988e7e2..cbb933fd8ccc62776e8cf97aa3ecb805f8e1be2e 100644 (file)
@@ -25,6 +25,7 @@ import org.mxchange.jphone.phonenumbers.smsprovider.SmsProvider;
 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
+import org.mxchange.jusercore.exceptions.UserPasswordMismatchException;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
 
@@ -478,4 +479,12 @@ public interface UserWebSessionController extends Serializable {
         * @return Whether the user id is empty
         */
        boolean isUserIdEmpty ();
+
+       /**
+        * Changes logged-in user's personal data if the current password matches
+        * and TAC + privacy statement has been accepted.
+        * <p>
+        * @throws UserPasswordMismatchException If the entered password doesn't match
+        */
+       void doChangePersonalData () throws UserPasswordMismatchException;
 }
index 12f96e1ba2130f5db1812220127e96ec1bb5c93b..f27b5c837d90b44071152ffcfe1e5acaaa1a4350 100644 (file)
@@ -28,7 +28,7 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcoreeelogger.beans.local.logger.Log;
 import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
-import org.mxchange.jcountry.data.AddressbookCountrySingletonBeanRemote;
+import org.mxchange.jcountry.data.JobsCountrySingletonBeanRemote;
 import org.mxchange.jcountry.data.Country;
 
 /**
@@ -42,7 +42,7 @@ public class CountryConverter implements Converter {
        /**
         * Country bean
         */
-       private AddressbookCountrySingletonBeanRemote countryController;
+       private JobsCountrySingletonBeanRemote countryController;
 
        /**
         * Logger instance
@@ -63,7 +63,7 @@ public class CountryConverter implements Converter {
                        this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
 
                        // ... and country controller
-                       this.countryController = (AddressbookCountrySingletonBeanRemote) context.lookup("java:global/jjobs-ejb/country!org.mxchange.jcountry.data.AddressbookCountrySingletonBeanRemote"); //NOI18N
+                       this.countryController = (JobsCountrySingletonBeanRemote) context.lookup("java:global/jjobs-ejb/country!org.mxchange.jcountry.data.JobsCountrySingletonBeanRemote"); //NOI18N
                } catch (final NamingException ex) {
                        // Continue to throw it
                        throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
diff --git a/src/java/org/mxchange/jjobs/validators/password/UserPasswordValidator.java b/src/java/org/mxchange/jjobs/validators/password/UserPasswordValidator.java
new file mode 100644 (file)
index 0000000..e1d9044
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2016 quix0r
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jjobs.validators.password;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+import javax.inject.Inject;
+import org.mxchange.jcoreee.validator.string.BaseStringValidator;
+import org.mxchange.jjobs.beans.login.UserLoginWebSessionController;
+import org.mxchange.jusercore.container.login.LoginContainer;
+import org.mxchange.jusercore.container.login.UserLoginContainer;
+import org.mxchange.jusercore.model.user.UserUtils;
+
+/**
+ * A validator for validating passwords (if they match with stored)
+ * <p>
+ * @author Roland Haeder
+ */
+public class UserPasswordValidator extends BaseStringValidator implements Validator {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 48_581_795_687_317L;
+
+       /**
+        * User login controller
+        */
+       @Inject
+       private UserLoginWebSessionController loginController;
+
+       @Override
+       public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException {
+               // Trace message
+               //this.getLogger().logTrace(MessageFormat.format("validate: context={0},component={1},value={2} - CALLED!", context, component, value)); //NOI18N
+
+               // The required field
+               String[] requiredFileds = {"currentPassword"}; //NOI18N
+
+               // Pre-validation (example: not null, not a string, empty string ...)
+               super.preValidate(context, component, value, requiredFileds, false);
+
+               // value is known to be an entered password, so instance login container
+               LoginContainer container = new UserLoginContainer(this.loginController.getLoggedInUser(), (String) value);
+
+               // Test it here
+               if (!UserUtils.ifPasswordMatches(container, this.loginController.getLoggedInUser())) {
+                       // Password mismatches
+                       throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Password mismatching.", "The password the user has entered does not match the stored password.")); //NOI18N
+               }
+
+               // Trace message
+               //this.getLogger().logTrace("validate: EXIT!"); //NOI18N
+       }
+}
index 473217eb3363f514f83211dd5eecde2dbee87bb5..9c3dca0a1e5eaee34ce459058aaeb5c4884d2954 100644 (file)
@@ -256,3 +256,4 @@ LOGIN_ENTER_CURRENT_PASSWORD_CONFIRM=Derzeitiges Passwort:
 BUTTON_CHANGE_PERSONAL_DATA=Persoenliche Daten aendern
 #TODO: Please fix German umlaut!
 LOGIN_CHANGE_PERSONAL_DATA_TITLE=Persoenliche Daten aendern:
+ERROR_CURRENT_PASSWORD_MISMATCHING=Ihr eingegebenes Passwort entspricht nicht dem aktuell gespeicherten Passwort.
index 032df0c2eaecd9aae2d99b414c8ed4d084d948cc..a348ece0e224ff7c4bc3dbc747360029a7db4dae 100644 (file)
@@ -240,3 +240,4 @@ LOGIN_ENTER_CURRENT_PASSWORD_CONFIRMATION_LEGEND_TITLE=Please enter your current
 LOGIN_ENTER_CURRENT_PASSWORD_CONFIRM=Current password:
 BUTTON_CHANGE_PERSONAL_DATA=Change personal data
 LOGIN_CHANGE_PERSONAL_DATA_TITLE=Change personal data:
+ERROR_CURRENT_PASSWORD_MISMATCHING=Your entered password doesn't match the currently stored one.
index 83579c0172e34f5f75c2d828c6d205203cbac03d..25547658f8cdd4241ae62d024e7b61ffc7b06118 100644 (file)
                <validator-id>UserIdValidator</validator-id>
                <validator-class>org.mxchange.addressbook.validator.user.UserIdValidator</validator-class>
        </validator>
+       <validator>
+               <validator-id>UserPasswordValidator</validator-id>
+               <validator-class>org.mxchange.jjobs.validators.password.UserPasswordValidator</validator-class>
+       </validator>
        <navigation-rule>
                <from-view-id>*</from-view-id>
                <navigation-case>
                        <to-view-id>/user/show_addressbook_entries.xhtml</to-view-id>
                </navigation-case>
        </navigation-rule>
-    <navigation-rule>
-        <from-view-id>/login/login_edit_user_data.xhtml</from-view-id>
-        <navigation-case>
-            <from-outcome>login_change_email_address</from-outcome>
-            <to-view-id>/login/login_change_email_address.xhtml</to-view-id>
-        </navigation-case>
-        <navigation-case>
-            <from-outcome>login_change_password</from-outcome>
-            <to-view-id>/login/login_change_password.xhtml</to-view-id>
-        </navigation-case>
-        <navigation-case>
-            <from-outcome>login_change_personal_data</from-outcome>
-            <to-view-id>/login/login_change_personal_data.xhtml</to-view-id>
-        </navigation-case>
-    </navigation-rule>
+       <navigation-rule>
+               <from-view-id>/login/login_edit_user_data.xhtml</from-view-id>
+               <navigation-case>
+                       <from-outcome>login_change_email_address</from-outcome>
+                       <to-view-id>/login/login_change_email_address.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>login_change_password</from-outcome>
+                       <to-view-id>/login/login_change_password.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>login_change_personal_data</from-outcome>
+                       <to-view-id>/login/login_change_personal_data.xhtml</to-view-id>
+               </navigation-case>
+       </navigation-rule>
 </faces-config>
index b218c729f9a72ffbd9258c7c8f44b84cb55ca539..517870e1ec2023e6c585734c484477ad60467c20 100644 (file)
                                </div>
 
                                <div class="table_right">
-                                       <h:inputSecret class="input" id="currentPassword" size="10" maxlength="255" value="#{loginController.currentPassword}" required="true" />
+                                       <h:inputSecret class="input" id="currentPassword" size="10" maxlength="255" value="#{loginController.currentPassword}" required="true" validatorMessage="#{msg.ERROR_CURRENT_PASSWORD_MISMATCHING}">
+                                               <h:message for="currentPassword" />
+                                               <f:validator for="currentPassword" validatorId="UserPasswordValidator" />
+                                       </h:inputSecret>
                                </div>
 
                                <div class="clear"></div>
index ffe77f49cc01538aac76c4051a01ce106da0c6e7..a951a4dcc6288b61040f57adbd7940609faab7bd 100644 (file)
@@ -9,12 +9,15 @@
                        <li class="footer_link">
                                <h:link outcome="login_index" title="#{msg.LINK_LOGIN_HOME_TITLE}" value="#{msg.LINK_LOGIN_HOME}" />
                        </li>
+
                        <li class="footer_link">
                                <h:link outcome="imprint" title="#{msg.LINK_GUEST_IMPRINT_TITLE}" value="#{msg.LINK_GUEST_IMPRINT}" />
                        </li>
+
                        <li class="footer_link">
                                <h:link outcome="terms" title="#{msg.LINK_GUEST_TERMS_TITLE}" value="#{msg.LINK_GUEST_TERMS}" />
                        </li>
+
                        <li class="footer_link">
                                <h:link outcome="privacy" title="#{msg.LINK_GUEST_PRIVACY_TITLE}" value="#{msg.LINK_GUEST_PRIVACY}" />
                        </li>
index e1711f0defe630c57afbac614d1ef9ec3a215290..b441a30407cc969b4d63d7649322bd32a9a322b4 100644 (file)
@@ -29,7 +29,7 @@
 
                                                <div class="table_footer">
                                                        <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                                       <h:commandButton class="submit" type="submit" id="change_personal_data" value="#{msg.BUTTON_CHANGE_PERSONAL_DATA}" action="#{userController.changePersonalData()}" />
+                                                       <h:commandButton class="submit" type="submit" id="change_personal_data" value="#{msg.BUTTON_CHANGE_PERSONAL_DATA}" action="#{userController.doChangePersonalData()}" />
                                                </div>
                                        </h:form>
                                </div>