From a32348b0a2b0e00c6e245e87dbe17ee87d7d91ac Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 23 Oct 2015 20:52:42 +0200 Subject: [PATCH] Bad work-around, didn't work. It looks like that c:set is being not executed? Or maybe on other life-cycle of the application? --- .../profile/UserProfileWebRequestBean.java | 21 ------------------- .../UserProfileWebRequestController.java | 10 --------- .../login_start_sharing_addressbook.xhtml | 2 +- 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/src/java/org/mxchange/addressbook/beans/profile/UserProfileWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/profile/UserProfileWebRequestBean.java index 45eae1dd..0bc3169b 100644 --- a/src/java/org/mxchange/addressbook/beans/profile/UserProfileWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/profile/UserProfileWebRequestBean.java @@ -106,27 +106,6 @@ public class UserProfileWebRequestBean implements UserProfileWebRequestControlle (this.loginController.isUserLoggedIn()) && (profileMode.equals(ProfileMode.MEMBERS))); } - @Override - public boolean isProfileLinkVisibleByUser (final User user) { - // Is the user instance valid? - if (null == user) { - // Throw NPE here - throw new NullPointerException("user is null"); - } else if (user.getUserId() == null) { - // Throw NPE again - throw new NullPointerException("user.userId is null"); - } else if (user.getUserId() < 1) { - // Throw NPE again - throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid", user.getUserId())); - } - - // Set it here - this.setUser(user); - - // Ask other method - return this.isProfileLinkVisible(); - } - @Override public boolean isProfileLinkVisibleById (final Long userId) { // Init user instance diff --git a/src/java/org/mxchange/addressbook/beans/profile/UserProfileWebRequestController.java b/src/java/org/mxchange/addressbook/beans/profile/UserProfileWebRequestController.java index 437c2d4c..12e04ebd 100644 --- a/src/java/org/mxchange/addressbook/beans/profile/UserProfileWebRequestController.java +++ b/src/java/org/mxchange/addressbook/beans/profile/UserProfileWebRequestController.java @@ -33,16 +33,6 @@ public interface UserProfileWebRequestController extends Serializable { */ boolean isProfileLinkVisible (); - /** - * Checks if given user's profile is visible to the currently logged-in - * user. - *

- * @param user User instance - *

- * @return Whether the profile link is visible - */ - boolean isProfileLinkVisibleByUser (final User user); - /** * Checks if the user profile link is visible *

diff --git a/web/login/login_start_sharing_addressbook.xhtml b/web/login/login_start_sharing_addressbook.xhtml index e3ebb78a..ac7c368a 100644 --- a/web/login/login_start_sharing_addressbook.xhtml +++ b/web/login/login_start_sharing_addressbook.xhtml @@ -38,7 +38,7 @@ #{msg.LOGIN_START_SHARING_TITLE} - + -- 2.39.5