From c7400e29245c0ba72a3f4161f8fa7cf66691fcab Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 16 Oct 2015 14:12:41 +0200 Subject: [PATCH] =?utf8?q?Continued:=20-=20added=20bean=20method=20isAddre?= =?utf8?q?ssbookLoaded()=20-=20rewrote=20login=5Fshow=5Faddressbook.xhtml?= =?utf8?q?=20to=20only=20show=20data=20when=20the=20id=20is=20valid=20Sign?= =?utf8?q?ed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../beans/addressbook/AddressbookWebBean.java | 5 +++ .../addressbook/AddressbookWebController.java | 7 +++ .../localization/bundle_de_DE.properties | 2 + .../localization/bundle_en_US.properties | 2 + web/login/login_show_addressbook.xhtml | 44 ++++++++----------- 5 files changed, 34 insertions(+), 26 deletions(-) diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java index 3c7efb1f..1b9dbc98 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java @@ -404,6 +404,11 @@ public class AddressbookWebBean implements AddressbookWebController { return Objects.equals(this.getAddressbookUser(), this.loginController.getLoggedInUser()); } + @Override + public boolean isAddressbookLoaded () { + return (this.getAddressbookId() instanceof Long); + } + /** * Initializes the user user's address book list */ diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java index 96d29412..905e5109 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java @@ -201,4 +201,11 @@ public interface AddressbookWebController extends Serializable { * @return List of not sharing users */ List allUsersNotSharing (); + + /** + * Checks wether an address book has been loaded by checking the id number. + *

+ * @return Whether the address book is loaded + */ + public boolean isAddressbookLoaded (); } diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 0ef5b8da..c9d33826 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -244,3 +244,5 @@ SHARE_CREATED=Wann gestartet: SHARE_CREATED_TITLE=Wann die Freigabe erfolgte SHARED_ADDRESSBOOK_TITLE=Welches Adressbuch freigegeben wurde SHAREE_USER_NAME_TITLE=Mit wem Sie Ihr Adressbuch teilen +ADDRESSBOOK_OWNER=Besitzer: +ADDRESSBOOK_STATUS=Status: diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 0d2bb8cf..5360151b 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -244,3 +244,5 @@ SHARE_CREATED=Started: SHARE_CREATED_TITLE=When the sharing has started. SHARED_ADDRESSBOOK_TITLE=Which address book is being shared SHAREE_USER_NAME_TITLE=With who you shared your address book +ADDRESSBOOK_OWNER=Owner: +ADDRESSBOOK_STATUS=Status: diff --git a/web/login/login_show_addressbook.xhtml b/web/login/login_show_addressbook.xhtml index f7065278..80922bdc 100644 --- a/web/login/login_show_addressbook.xhtml +++ b/web/login/login_show_addressbook.xhtml @@ -21,52 +21,44 @@ -

-
- #{msg.TABLE_HEADER_SHOW_ADDRESSBOOK} -
+ +
+
+ #{msg.TABLE_HEADER_SHOW_ADDRESSBOOK} +
-
- - +
+ #{msg.ADDRESSBOOK_ID} - - #{msg.ADDRESSBOOK_NAME} - - #{msg.ADDRESSBOOK_OWNER} - - #{msg.ADDRESSBOOK_CREATED} - - #{msg.ADDRESSBOOK_STATUS} - - -
+
+
- -
+
-- 2.39.5