From 47d9faa9f6be4ec78bcd2ca001c9ab903bdfd841 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 20 Oct 2015 12:40:20 +0200 Subject: [PATCH] cleanup from JSTL: - removed all JSTL usages as this mixes JSF with JSTL which more belongs to JSP - used f:setPropertyActionListener to set the currently used user instance in profileController.user - sorry that there is still ui:fragment around but I don't like/want overlong expressions in rendered attributes - better throw IllegalStateException and not quietly return false in isOwnAddressbook() this method should only work when the user is logged-in - improved some exception text MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by:Roland Häder --- .../AddressbookWebSessionBean.java | 2 +- .../beans/login/UserLoginWebSessionBean.java | 2 +- web/imprint.xhtml | 1 - web/index.xhtml | 1 - web/login/login_shared_addressbooks.xhtml | 2 +- .../login_start_sharing_addressbook.xhtml | 12 ++++---- web/privacy.xhtml | 1 - web/terms.xhtml | 1 - web/user/login.xhtml | 1 - web/user/lost_passwd.xhtml | 1 - web/user/register.xhtml | 1 - web/user/register_done.xhtml | 1 - web/user/show_addressbook.xhtml | 30 ++++++------------- web/user/user_list.xhtml | 4 +-- 14 files changed, 19 insertions(+), 41 deletions(-) diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java index cfc167dd..eb4dee33 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java @@ -397,7 +397,7 @@ public class AddressbookWebSessionBean implements AddressbookWebSessionControlle // Is the user logged in? if (!this.loginController.isUserLoggedIn()) { // No, then no own address book - return false; + throw new IllegalStateException("isOwnAddressbook() has been invoked for a guest account"); //NOI18N } // Is same user? diff --git a/src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionBean.java index 3dd30eb6..a150320a 100644 --- a/src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionBean.java @@ -178,7 +178,7 @@ public class UserLoginWebSessionBean implements UserLoginWebSessionController { // Check on login if (!this.isUserLoggedIn()) { // Not logged in! - throw new IllegalStateException("isInvisible() was called for guest."); //NOI18N + throw new IllegalStateException("isInvisible() has been invoked for a guest."); //NOI18N } // Check logged-in first, then invisibility diff --git a/web/imprint.xhtml b/web/imprint.xhtml index 5f18036a..e5cd5715 100644 --- a/web/imprint.xhtml +++ b/web/imprint.xhtml @@ -3,7 +3,6 @@ diff --git a/web/index.xhtml b/web/index.xhtml index 60403707..1af56cbb 100644 --- a/web/index.xhtml +++ b/web/index.xhtml @@ -3,7 +3,6 @@ diff --git a/web/login/login_shared_addressbooks.xhtml b/web/login/login_shared_addressbooks.xhtml index 8ce811db..358a5910 100644 --- a/web/login/login_shared_addressbooks.xhtml +++ b/web/login/login_shared_addressbooks.xhtml @@ -33,7 +33,7 @@ #{msg.SHAREE_USER_NAME} - + diff --git a/web/login/login_start_sharing_addressbook.xhtml b/web/login/login_start_sharing_addressbook.xhtml index 6704fb30..2f152fe1 100644 --- a/web/login/login_start_sharing_addressbook.xhtml +++ b/web/login/login_start_sharing_addressbook.xhtml @@ -3,9 +3,7 @@ + xmlns:f="http://xmlns.jcp.org/jsf/core"> #{msg.PAGE_TITLE_LOGIN_START_SHARING_ADDRESSBOOK} @@ -22,6 +20,8 @@
+ + @@ -32,7 +32,7 @@ #{msg.USER_NAME} - + @@ -44,9 +44,7 @@ - - - +