]> git.mxchange.org Git - jjobs-war.git/commitdiff
Some improvements:
authorRoland Haeder <roland@mxchange.org>
Fri, 4 Mar 2016 20:06:25 +0000 (21:06 +0100)
committerRoland Haeder <roland@mxchange.org>
Fri, 4 Mar 2016 20:06:25 +0000 (21:06 +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/jjobs/beans/login/UserLoginWebSessionBean.java
src/java/org/mxchange/jjobs/beans/login/UserLoginWebSessionController.java
src/java/org/mxchange/jjobs/beans/user/UserWebSessionBean.java

index f81c1f8a81befd0b90681e8bf12bdad5782ee2b5..449e4e6027006cfa168acc43dfa1753ee3f370ad 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 7e156f8c1d528128902a1a3e1e91cb8987f7405a..b1454d39a63595ce8ab11dfeb283628ff8e38310 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 2fef5a9aa05fd7e122afedf5fd137995144a9df0..bb122ea7770f9a73b4259800830506d43d0999c9 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
        }