]> git.mxchange.org Git - addressbook-war.git/commitdiff
Some improvements:
authorRoland Haeder <roland@mxchange.org>
Fri, 4 Mar 2016 20:08:31 +0000 (21:08 +0100)
committerRoland Haeder <roland@mxchange.org>
Fri, 4 Mar 2016 20:08:31 +0000 (21:08 +0100)
- added currentPassword field in loginController
- simply copy all user data to the userController instance and you can use it again in forms

src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionBean.java
src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionController.java
src/java/org/mxchange/addressbook/beans/user/UserWebSessionBean.java

index d01bba70c23635f26879719740fb65cec8f48684..dd516430ff50fb3f31ce2afaa5d53fd75476a8c6 100644 (file)
@@ -54,13 +54,18 @@ public class UserLoginWebSessionBean implements UserLoginWebSessionController {
         */
        private static final long serialVersionUID = 47_828_986_719_691_592L;
 
+       /**
+        * Current password
+        */
+       private String currentPassword;
+
        /**
         * Logged-in user instance
         */
        private User loggedInUser;
 
        /**
-        * Reemote register session bean
+        * Remote register session bean
         */
        private UserLoginSessionBeanRemote loginBean;
 
@@ -133,6 +138,16 @@ public class UserLoginWebSessionBean implements UserLoginWebSessionController {
                }
        }
 
+       @Override
+       public String getCurrentPassword () {
+               return currentPassword;
+       }
+
+       @Override
+       public void setCurrentPassword (final String currentPassword) {
+               this.currentPassword = currentPassword;
+       }
+
        @Override
        public User getLoggedInUser () {
                return this.loggedInUser;
index 31d9b212f82c5310847bd7da29db6d237ac91200..0ef4c8e3f9d4b9b34fecdf70c6027ba620ebd1c3 100644 (file)
@@ -81,4 +81,18 @@ public interface UserLoginWebSessionController extends Serializable {
         * @return Whether the currently logged-in user is invisible
         */
        boolean isInvisible ();
+
+       /**
+        * Setter for current password (clear text)
+        * <p>
+        * @param currentPassword Current password
+        */
+       void setCurrentPassword (final String currentPassword);
+
+       /**
+        * Getter for current password (clear text)
+        * <p>
+        * @return Current password
+        */
+       String getCurrentPassword ();
 }
index 83272cac453e63d98fab26059b9a1d205b50fa2e..5a7705218235f12a0f9c011d1fe203d8e1cd0a90 100644 (file)
@@ -309,6 +309,9 @@ public class UserWebSessionBean implements UserWebSessionController {
                // Re-initialize list
                this.visibleUserList = this.userBean.allMemberPublicVisibleUsers();
 
+               // Copy all data to this bean
+               this.copyUser(event.getUser());
+
                // Trace message
                System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: this.visibleUserList.size()={0} - EXIT!", this.visibleUserList.size())); //NOI18N
        }