From c0c658cdfa32e52180cfcde5b042fc5f486a869d Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 15 Oct 2015 08:59:37 +0200 Subject: [PATCH] =?utf8?q?added=20isShareeUserIdSet()=20and=20used=20it=20?= =?utf8?q?to=20hide=20output=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../mxchange/addressbook/beans/shares/SharesWebBean.java | 5 +++++ .../addressbook/beans/shares/SharesWebController.java | 7 +++++++ web/user/user_profile.xhtml | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/java/org/mxchange/addressbook/beans/shares/SharesWebBean.java b/src/java/org/mxchange/addressbook/beans/shares/SharesWebBean.java index 5d57825f..ce4e4675 100644 --- a/src/java/org/mxchange/addressbook/beans/shares/SharesWebBean.java +++ b/src/java/org/mxchange/addressbook/beans/shares/SharesWebBean.java @@ -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 diff --git a/src/java/org/mxchange/addressbook/beans/shares/SharesWebController.java b/src/java/org/mxchange/addressbook/beans/shares/SharesWebController.java index b61838db..868fa810 100644 --- a/src/java/org/mxchange/addressbook/beans/shares/SharesWebController.java +++ b/src/java/org/mxchange/addressbook/beans/shares/SharesWebController.java @@ -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 + *

+ * @return Whether the sharee's user id is set + */ + public boolean isShareeUserIdSet (); } diff --git a/web/user/user_profile.xhtml b/web/user/user_profile.xhtml index b5eeb999..e7b21a7a 100644 --- a/web/user/user_profile.xhtml +++ b/web/user/user_profile.xhtml @@ -20,7 +20,7 @@ #{msg.CONTENT_TITLE_INDEX_USER_PROFILE} - + Here goes your content. -- 2.39.5