]> git.mxchange.org Git - addressbook-war.git/commitdiff
Bad work-around, didn't work. It looks like that c:set is being not executed? Or...
authorRoland Haeder <roland@mxchange.org>
Fri, 23 Oct 2015 18:52:42 +0000 (20:52 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 23 Oct 2015 18:52:42 +0000 (20:52 +0200)
src/java/org/mxchange/addressbook/beans/profile/UserProfileWebRequestBean.java
src/java/org/mxchange/addressbook/beans/profile/UserProfileWebRequestController.java
web/login/login_start_sharing_addressbook.xhtml

index 45eae1dd871a9c2037a72f4d0b0064394360d3f2..0bc3169b941dcea8e20dd68bba04f22103444f5f 100644 (file)
@@ -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
index 437c2d4c747df54a7ca6b88cd8b3d5dde83ce6ee..12e04ebdecb912344057d2a84b90fc9df9220ddd 100644 (file)
@@ -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.
-        * <p>
-        * @param user User instance
-        * <p>
-        * @return Whether the profile link is visible
-        */
-       boolean isProfileLinkVisibleByUser (final User user);
-
        /**
         * Checks if the user profile link is visible
         * <p>
index e3ebb78a68de7c179fb28c0366abefc33e263ade..ac7c368aceefc45592f7803136f5f0159703378f 100644 (file)
@@ -38,7 +38,7 @@
 
                                                <h:column>
                                                        <f:facet name="header">#{msg.LOGIN_START_SHARING_TITLE}</f:facet>
-                                                       <h:form acceptcharset="utf-8" id="startSharing" rendered="#{profileController.isProfileLinkVisibleByUser(user)}">
+                                                       <h:form acceptcharset="utf-8" id="startSharing" rendered="#{profileController.isProfileLinkVisible()}">
                                                                <h:commandButton class="submit" id="submit" value="#{msg.LOGIN_START_SHARING_BUTTON}" action="#{shareController.startSharing(user, addressbookController.addressbook)}" title="#{msg.LOGIN_START_SHARING_BUTTON_TITLE}" />
                                                        </h:form>
                                                </h:column>