]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Fri, 16 Oct 2015 12:12:41 +0000 (14:12 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 16 Oct 2015 12:12:41 +0000 (14:12 +0200)
- added bean method isAddressbookLoaded()
- rewrote login_show_addressbook.xhtml to only show data when the id is valid
Signed-off-by:Roland Häder <roland@mxchange.org>

src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java
src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/login/login_show_addressbook.xhtml

index 3c7efb1f42eaf3b54594f00693ba91787d63c459..1b9dbc98cae2f918011207488d71075037340021 100644 (file)
@@ -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
         */
index 96d294120f22991da8acb5ed14be712cd794eb8b..905e510987d1294add2fc7e7ddd5f20a96e83fb3 100644 (file)
@@ -201,4 +201,11 @@ public interface AddressbookWebController extends Serializable {
         * @return List of not sharing users
         */
        List<User> allUsersNotSharing ();
+
+       /**
+        * Checks wether an address book has been loaded by checking the id number.
+        * <p>
+        * @return Whether the address book is loaded
+        */
+       public boolean isAddressbookLoaded ();
 }
index 0ef5b8dacacfa70307b51014bbbb495118a8eae3..c9d3382665b8c2668d597b89ca7b6f51b25316e6 100644 (file)
@@ -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:
index 0d2bb8cff052952e224870dd87bd1c5017916787..5360151b37bdf48bfd3e69358f1237aadbf64877 100644 (file)
@@ -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:
index f7065278e1403daff1b624a80d5aebddd05e700e..80922bdc442c07a91a1b791681f8fbf8320933c6 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <div class="table_big">
-                               <div class="table_header">
-                                       #{msg.TABLE_HEADER_SHOW_ADDRESSBOOK}
-                               </div>
+                       <ui:fragment rendered="#{addressbookController.isAddressbookLoaded()}">
+                               <div class="table_big">
+                                       <div class="table_header">
+                                               #{msg.TABLE_HEADER_SHOW_ADDRESSBOOK}
+                                       </div>
 
-                               <div class="para">
-                                       <h:panelGrid headerClass="table_header_column" footerClass="table_footer" class="table" columns="3">
-                                               <h:column>
+                                       <div class="para">
+                                               <h:panelGrid headerClass="table_header_column" columns="3">
                                                        <f:facet name="header">#{msg.ADDRESSBOOK_ID}</f:facet>
                                                        <h:outputText id="addressbookId" value="#{addressbookController.addressbookId}" />
-                                               </h:column>
 
-                                               <h:column>
                                                        <f:facet name="header">#{msg.ADDRESSBOOK_NAME}</f:facet>
                                                        <h:outputText id="addressbookName" value="#{addressbookController.addressbookName}" />
-                                               </h:column>
 
-                                               <h:column>
                                                        <f:facet name="header">#{msg.ADDRESSBOOK_OWNER}</f:facet>
                                                        <h:link id="addressbookUser" outcome="user_profile" value="#{addressbookController.addressbookUser.userName}" />
-                                               </h:column>
 
-                                               <h:column>
                                                        <f:facet name="header">#{msg.ADDRESSBOOK_CREATED}</f:facet>
                                                        <h:outputFormat id="addressbookCreated" value="#{addressbookController.addressbook.addressbookCreated.time}" title="#{msg.ADDRESSBOOK_CREATED_TITLE}">
                                                                <f:convertDateTime for="addressbookCreated" type="both" timeStyle="short" dateStyle="medium" />
                                                        </h:outputFormat>
-                                               </h:column>
 
-                                               <h:column>
                                                        <f:facet name="header">#{msg.ADDRESSBOOK_STATUS}</f:facet>
                                                        <h:outputFormat id="addressbookCreated" value="#{msg[addressbookController.addressbook.addressbookStatus.messageKey]}" title="#{msg.ADDRESSBOOK_STATUS_TITLE}" />
-                                               </h:column>
-                                       </h:panelGrid>
-                               </div>
+                                               </h:panelGrid>
+                                       </div>
 
-                               <div class="table_footer">
-                                       <ui:fragment rendered="#{addressbookController.isOwnAddressbook()}">
-                                               <h:link id="startSharing" outcome="login_start_sharing_addressbook" value="#{msg.LINK_LOGIN_START_SHARING_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_START_SHARING_ADDRESSBOOK_TITLE}" />
-                                       </ui:fragment>
+                                       <div class="table_footer">
+                                               <ui:fragment rendered="#{addressbookController.isOwnAddressbook()}">
+                                                       <h:link id="startSharing" outcome="login_start_sharing_addressbook" value="#{msg.LINK_LOGIN_START_SHARING_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_START_SHARING_ADDRESSBOOK_TITLE}" />
+                                               </ui:fragment>
 
-                                       <ui:fragment rendered="#{addressbookController.isOtherAddressbook()}">
-                                               Bla bla
-                                       </ui:fragment>
+                                               <ui:fragment rendered="#{addressbookController.isOtherAddressbook()}">
+                                                       Bla bla
+                                               </ui:fragment>
+                                       </div>
                                </div>
-                       </div>
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>