From: Roland Haeder Date: Tue, 20 Oct 2015 10:40:20 +0000 (+0200) Subject: cleanup from JSTL: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=47d9faa9f6be4ec78bcd2ca001c9ab903bdfd841;p=addressbook-war.git 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 Signed-off-by:Roland Häder --- 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 @@ - - - +