]> git.mxchange.org Git - jfinancials-war.git/commitdiff
added isShareeUserIdSet() and used it to hide output
authorRoland Haeder <roland@mxchange.org>
Thu, 15 Oct 2015 06:59:37 +0000 (08:59 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 15 Oct 2015 06:59:37 +0000 (08:59 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/java/org/mxchange/addressbook/beans/shares/SharesWebBean.java
src/java/org/mxchange/addressbook/beans/shares/SharesWebController.java
web/user/user_profile.xhtml

index 5d57825f087f90d8dcbb80f14705ef26601683c4..ce4e467584674fe4e104275a2ebb67cb9dc243af 100644 (file)
@@ -88,6 +88,11 @@ public class SharesWebBean implements SharesWebController {
                this.shareeUserId = shareeUserId;
        }
 
+       @Override
+       public boolean isShareeUserIdSet () {
+               return ((this.getShareeUserId() instanceof Long) && (this.getShareeUserId() > 0));
+       }
+
        @Override
        public boolean isSharingAddressbooks () {
                // Only to be called for logged-in users
index b61838db122f095f72efaa5303f1b1e182ca2f71..868fa810b4d4c5b3b0c2561c30dafac993bf6b98 100644 (file)
@@ -45,4 +45,11 @@ public interface SharesWebController extends Serializable {
         * @param shareeUserId Sharee's user id
         */
        public void setShareeUserId (final Long shareeUserId);
+
+       /**
+        * Checks whether the sharee's user id is set
+        * <p>
+        * @return Whether the sharee's user id is set
+        */
+       public boolean isShareeUserIdSet ();
 }
index b5eeb999bc5c0f53e47ac4a5cccedd0fac28dc74..e7b21a7a73498b2d26b8fc8a0afb433b62b2fd9b 100644 (file)
@@ -20,7 +20,7 @@
                        #{msg.CONTENT_TITLE_INDEX_USER_PROFILE}
                </ui:define>
 
-               <ui:define name="content">
+               <ui:define name="content" rendered="#{shareController.isShareeUserIdSet()}">
                        Here goes your content.
                </ui:define>
        </ui:composition>