]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Mon, 19 Oct 2015 11:30:07 +0000 (13:30 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 19 Oct 2015 11:30:07 +0000 (13:30 +0200)
- rewrote to .equals() on an enum
- rewrote user_profile_link.tpl (better style)
- added missing i18n string
- added missing navigation case
Signed-off-by:Roland Häder <roland@mxchange.org>

src/java/org/mxchange/addressbook/beans/login/UserLoginWebSessionBean.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/faces-config.xml
web/WEB-INF/templates/generic/user_profile_link.tpl

index ca8874f70791ae913d70335c1ef7717f0d1af09d..3dd30eb62e64ed5732e64463619b95a8a95915ef 100644 (file)
@@ -182,6 +182,6 @@ public class UserLoginWebSessionBean implements UserLoginWebSessionController {
                }
 
                // Check logged-in first, then invisibility
-               return ((Objects.equals(this.getLoggedInUser().getUserProfileMode(), ProfileMode.INVISIBLE)));
+               return this.getLoggedInUser().getUserProfileMode().equals(ProfileMode.INVISIBLE);
        }
 }
index e5935a8fc59dc8c9010b653f8ddad1755c43af9e..82562c2820c7b64d39a2fdef938ed8cff6550c1d 100644 (file)
@@ -265,3 +265,4 @@ LOGIN_NO_PASSWORD_MESSAGE=Sie haben kein Passwort eingegeben.
 LOGIN_NO_USER_NAME_MESSAGE=Sie haben keinen Benutzernamen eingegeben.
 USER_NOT_LOGGED_IN=Sie sind nicht angemeldet.
 LOGIN_OWN_PROFILE_INVISIBLE=Ihr Profil ist auf "durchsichtig" gestellt.
+ERROR_USER_INSTANCE_NOT_SET=Fehler: Benutzer-Instanz nicht gesetzt.
index 1bbe0411ea10e22b68be7932cda03dbb68964f2f..8d1678c348853a9565bebfbf49bbbfa9cb8c5c3f 100644 (file)
@@ -260,3 +260,4 @@ LOGIN_NO_PASSWORD_MESSAGE=You have entered no password.
 LOGIN_NO_USER_NAME_MESSAGE=You have entered no user name.
 USER_NOT_LOGGED_IN=You are not signed in.
 LOGIN_OWN_PROFILE_INVISIBLE=Your profile is set to "invisible".
+ERROR_USER_INSTANCE_NOT_SET=Error: User instance not set.
index 74bb3322780ed9a178f1bb0afab367b4b0ca1b17..969fbf47a8b617f494d8f680ab9ae43473a049cc 100644 (file)
                        <to-view-id>/login/login_start_sharing_addressbook.xhtml</to-view-id>
                </navigation-case>
        </navigation-rule>
+       <navigation-rule>
+               <from-view-id>/login/login_shared_addressbooks.xhtml</from-view-id>
+               <navigation-case>
+                       <from-outcome>user_show_addressbook</from-outcome>
+                       <to-view-id>/user/show_addressbook.xhtml</to-view-id>
+               </navigation-case>
+       </navigation-rule>
 </faces-config>
index 617a04967e9c0953a7bd3d6ec9d4dacaada3ad26..0825e2a3b94d4f64cded0abd11a9e48acac16814 100644 (file)
@@ -7,7 +7,11 @@
        xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
 
        <c:choose>
-               <c:when test="#{user != null and profileController.isProfileLinkVisible(user)}">
+               <c:when test="#{user == null}">
+                       <h:outputText class="notice" value="#{msg.ERROR_USER_INSTANCE_NOT_SET}" />
+               </c:when>
+
+               <c:when test="profileController.isProfileLinkVisible(user)}">
                        <h:link id="userProfileLink" outcome="user_profile" title="#{msg.LINK_USER_PROFILE_TITLE}">
                                <h:outputText id="userName" value="#{user.userName}" />
                                <f:param name="userId" value="#{user.userId}" />
@@ -15,7 +19,7 @@
                </c:when>
 
                <c:otherwise>
-                       #{msg.USER_PROFILE_NOT_PUBLICLY_VISIBLE}
+                       <h:outputText class="notice" value="#{msg.USER_PROFILE_NOT_PUBLICLY_VISIBLE}" />
                </c:otherwise>
        </c:choose>
 </ui:composition>