]> git.mxchange.org Git - jfinancials-war.git/commitdiff
added check for addressbookController.addressbook to prevent ugly NPE
authorRoland Haeder <roland@mxchange.org>
Fri, 23 Oct 2015 16:34:03 +0000 (18:34 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 23 Oct 2015 16:34:03 +0000 (18:34 +0200)
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/login/login_start_sharing_addressbook.xhtml

index 82562c2820c7b64d39a2fdef938ed8cff6550c1d..929c67e5431b3728633b5d9ae72b7ff9be74aead 100644 (file)
@@ -266,3 +266,4 @@ 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.
+LOGIN_ADDRESSBOOK_NOT_SET=Adressbuch-Instanz nicht gesetzt.
index 8d1678c348853a9565bebfbf49bbbfa9cb8c5c3f..9e7e0cb150097b110871bc4321ed7abf10ad7261 100644 (file)
@@ -261,3 +261,4 @@ 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.
+LOGIN_ADDRESSBOOK_NOT_SET=Address book instance not set.
index 7135ba122040b4c8cc927fcf023a1ccfcf687af8..d405ac8df1395d1fd943cff2873d424d369dd607 100644 (file)
@@ -23,7 +23,7 @@
                                <div class="para">
                                        <h:outputText id="ownProfileInvisible" class="notice" value="#{msg.USER_NOT_LOGGED_IN}" rendered="#{not loginController.isUserLoggedIn()}" />
 
-                                       <h:dataTable id="userList" headerClass="table_header_column" var="user" value="#{addressbookController.allUsersNotSharing()}" rendered="#{loginController.isUserLoggedIn() and not loginController.isInvisible()}">
+                                       <h:dataTable id="userList" headerClass="table_header_column" var="user" value="#{addressbookController.allUsersNotSharing()}" rendered="#{loginController.isUserLoggedIn() and not empty addressbookController.addressbook and not loginController.isInvisible()}">
                                                <c:set value="#{user}" target="#{profileController}" property="user" />
                                                <h:column>
                                                        <f:facet name="header">#{msg.USER_ID}</f:facet>
@@ -43,7 +43,9 @@
                                                </h:column>
                                        </h:dataTable>
 
-                                       <h:outputText id="ownProfileInvisible" class="notice" value="#{msg.LOGIN_OWN_PROFILE_INVISIBLE}" rendered="#{loginController.isUserLoggedIn() and not loginController.isInvisible()}" />
+                                       <h:outputText id="addressbokUnset" class="notice" value="#{msg.LOGIN_ADDRESSBOOK_NOT_SET}" rendered="#{empty addressbookController.addressbook}" />
+
+                                       <h:outputText id="ownProfileInvisible" class="notice" value="#{msg.LOGIN_OWN_PROFILE_INVISIBLE}" rendered="#{loginController.isUserLoggedIn() and not empty addressbookController.addressbook and not loginController.isInvisible()}" />
                                </div>
 
                                <div class="table_footer">