From: Roland Haeder Date: Fri, 4 Mar 2016 20:08:31 +0000 (+0100) Subject: Some improvements: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b795c946b176c49bbdd70353d6ab57eb7d02f187;p=jfinancials-war.git Some improvements: - added currentPassword field in loginController - simply copy all user data to the userController instance and you can use it again in forms --- diff --git a/src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionBean.java index d01bba70..dd516430 100644 --- a/src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionBean.java @@ -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; diff --git a/src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionController.java b/src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionController.java index 31d9b212..0ef4c8e3 100644 --- a/src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionController.java +++ b/src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionController.java @@ -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) + *

+ * @param currentPassword Current password + */ + void setCurrentPassword (final String currentPassword); + + /** + * Getter for current password (clear text) + *

+ * @return Current password + */ + String getCurrentPassword (); } diff --git a/src/java/org/mxchange/addressbook/beans/user/UserWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/user/UserWebSessionBean.java index 83272cac..5a770521 100644 --- a/src/java/org/mxchange/addressbook/beans/user/UserWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/UserWebSessionBean.java @@ -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 }