]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Fri, 9 Oct 2015 12:22:52 +0000 (14:22 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 9 Oct 2015 12:22:52 +0000 (14:22 +0200)
- added para div containers for data table and new addressbook links
- added missing language strings for login_own_addressbooks.xhtml
- added list for user's address book list
- added controller method hasCreatedAddressbooks()
- updated jars
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jcontacts-business-core.jar
lib/jcore.jar
lib/jcoreee.jar
lib/juser-core.jar
lib/juser-lib.jar
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_own_addressbooks.xhtml

index bf2dfa241afbce987fc860fe38aabab5e52aed4b..1d48fff8e48eac22533e749af4091cb7fd83c3b5 100644 (file)
Binary files a/lib/jcontacts-business-core.jar and b/lib/jcontacts-business-core.jar differ
index b3bed2d5841c6440f4bffbf90de0469d878a9957..8385969c15904e0574ee34e6cc9cc2560cc24165 100644 (file)
Binary files a/lib/jcore.jar and b/lib/jcore.jar differ
index b39cb8c944ebf489c444e37eff82a6afd0a78220..955e4a94a6ceaaef2069f8602724b4f623b337ed 100644 (file)
Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ
index 0300d87d7d5b0ce7a0a23f306d3700c724ce2ac2..0923bea8e18cbd1288f88634def6e4ffa327ee58 100644 (file)
Binary files a/lib/juser-core.jar and b/lib/juser-core.jar differ
index 161e8f95863bc9b2ebaed55b524aa5247e372cb6..e0d78fef552b21c16b32bb8b8e640c7685a4e64b 100644 (file)
Binary files a/lib/juser-lib.jar and b/lib/juser-lib.jar differ
index c14ef08171ee69a3affee0f4b534edfa45a5e025..f1b563e4f6a22abf47ba5b77d3867a63a9569df3 100644 (file)
  */
 package org.mxchange.addressbook.beans.addressbook;
 
-import javax.ejb.EJB;
+import java.util.List;
 import javax.enterprise.context.SessionScoped;
 import javax.faces.view.facelets.FaceletException;
+import javax.inject.Inject;
 import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.addressbook.beans.login.UserLoginWebController;
-import org.mxchange.addressbook.model.addressbooks.AddressbookSessionBeanRemote;
+import org.mxchange.addressbook.model.addressbook.Addressbook;
+import org.mxchange.addressbook.model.addressbook.AddressbookSessionBeanRemote;
 
 /**
  * A user bean (controller)
@@ -41,6 +43,10 @@ public class AddressbookWebBean implements AddressbookWebController {
        private static final long serialVersionUID = 185_781_756_712_969L;
 
        /////////////////////// Properties /////////////////////
+       /**
+        * A list of all user's addressbooks
+        */
+       private List<Addressbook> addressbookList;
 
        /**
         * Remote addressbook bean
@@ -50,7 +56,7 @@ public class AddressbookWebBean implements AddressbookWebController {
        /**
         * Login controller
         */
-       @EJB
+       @Inject
        private UserLoginWebController loginController;
 
        /**
@@ -69,4 +75,9 @@ public class AddressbookWebBean implements AddressbookWebController {
                        throw new FaceletException(e);
                }
        }
+
+       @Override
+       public boolean hasCreatedAddressbooks () {
+               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+       }
 }
index d041136da6b4d77d35d6e3d9c66e29a95c6d468a..f8c076df6cab6ad35c863aafc88366aa3e197dfa 100644 (file)
@@ -24,4 +24,12 @@ import java.io.Serializable;
  * @author Roland Haeder<roland@mxchange.org>
  */
 public interface AddressbookWebController extends Serializable {
+
+       /**
+        * Checks whether the user has created addressbooks. For this method to work
+        * it is vital that the user is logged into his/her account.
+        * <p>
+        * @return Whether the user has created at least one addressbook
+        */
+       public boolean hasCreatedAddressbooks ();
 }
index a1127e95ccc71b84b199566aa9abec6c952c90d3..d868ea67664610ce6cb80001d27761f41ccd635b 100644 (file)
@@ -158,3 +158,7 @@ TERMS_CONDITIONS=Allgemeine Gesch\u00e4ftsbestimmungen
 PAGE_TITLE_LOGIN_AREA=Benuzterbereich
 TABLE_HEADER_LIST_OWN_ADDRESSBOOKS=Meine eigenen Adressb\u00fccher:
 TABLE_SUMMARY_LIST_OWN_ADDRESSBOOKS=Diese Tabelle listet alle von Ihnen angelegten Adressb\u00fccher sortiert nach Id-Nummer auf.
+LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK=Weiteres Adressbuch hinzuf\u00fcgen
+LINK_LOGIN_ADD_FIRST_ADDRESSBOOK=Erstes Adressbuch anlegen
+LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK_TITLE=Legen Sie ein weiteres Adressbuch an. So organisieren Sie Ihre Kontakte besser.
+LINK_LOGIN_ADD_FIRST_ADDRESSBOOK_TITLE=Legen Sie Ihr erstes Adressbuch an. Dies ist f\u00fcr das Verwalten von Kontakten erforderlich.
index 9a1a80713c9a52934864dc58d37d6b32c9bcb210..5cc5517f01b9db7154c32b909f87e359f88e46b1 100644 (file)
@@ -158,3 +158,7 @@ TERMS_CONDITIONS=Terms & Conditions
 PAGE_TITLE_LOGIN_AREA=User area
 TABLE_HEADER_LIST_OWN_ADDRESSBOOKS=My own address books:
 TABLE_SUMMARY_LIST_OWN_ADDRESSBOOKS=This table lists all of your created address books sorted by id nummer.
+LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK=Add additional address book
+LINK_LOGIN_ADD_FIRST_ADDRESSBOOK=Create first address book
+LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK_TITLE=You can create an additional address book here. This way you can organize your contacts.
+LINK_LOGIN_ADD_FIRST_ADDRESSBOOK_TITLE=Create your first address book. This is required to manage your contacts.
index 7f2e124222eee724f38d722965f7bf7c7a6e1719..561a1c790742938d8b92ac169a0aebca645201b3 100644 (file)
                                #{msg.TABLE_HEADER_LIST_OWN_ADDRESSBOOKS}
                        </div>
 
-                       <h:dataTable id="table_own_addressbooks" var="addressbook" value="#{addressbookController.allAddressbooks}" styleClass="table" summary="#{msg.TABLE_SUMMARY_LIST_OWN_ADDRESSBOOKS}" rendered="#{addressbookController.hasCreatedAddressbooks()}">
-                       </h:dataTable>
+                       <div class="para">
+                               <h:dataTable id="table_own_addressbooks" var="addressbook" value="#{addressbookController.allAddressbooks}" styleClass="table" summary="#{msg.TABLE_SUMMARY_LIST_OWN_ADDRESSBOOKS}" rendered="#{addressbookController.hasCreatedAddressbooks()}">
+                               </h:dataTable>
+                       </div>
+
+                       <div class="para">
+                               <h:link id="add_first_addressbook" outcome="login_add_addressbook" value="#{msg.LINK_LOGIN_ADD_FIRST_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_ADD_FIRST_ADDRESSBOOK_TITLE}" rendered="#{addressbookController.hasCreatedAddressbooks() == false}" />
+                               <h:link id="add_additional_addressbook" outcome="login_add_addressbook" value="#{msg.LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK_TITLE}" rendered="#{addressbookController.hasCreatedAddressbooks()}" />
+                       </div>
                </ui:define>
        </ui:composition>
 </html>