From: Roland Haeder Date: Fri, 9 Oct 2015 12:22:52 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0fb0af6e6593a71700aa3113dd7ac3080736fb7c;p=addressbook-war.git Continued: - 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 --- diff --git a/lib/jcontacts-business-core.jar b/lib/jcontacts-business-core.jar index bf2dfa24..1d48fff8 100644 Binary files a/lib/jcontacts-business-core.jar and b/lib/jcontacts-business-core.jar differ diff --git a/lib/jcore.jar b/lib/jcore.jar index b3bed2d5..8385969c 100644 Binary files a/lib/jcore.jar and b/lib/jcore.jar differ diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar index b39cb8c9..955e4a94 100644 Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ diff --git a/lib/juser-core.jar b/lib/juser-core.jar index 0300d87d..0923bea8 100644 Binary files a/lib/juser-core.jar and b/lib/juser-core.jar differ diff --git a/lib/juser-lib.jar b/lib/juser-lib.jar index 161e8f95..e0d78fef 100644 Binary files a/lib/juser-lib.jar and b/lib/juser-lib.jar differ diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java index c14ef081..f1b563e4 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java @@ -16,15 +16,17 @@ */ 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 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. + } } diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java index d041136d..f8c076df 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java @@ -24,4 +24,12 @@ import java.io.Serializable; * @author Roland Haeder */ 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. + *

+ * @return Whether the user has created at least one addressbook + */ + public boolean hasCreatedAddressbooks (); } diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index a1127e95..d868ea67 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -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. diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 9a1a8071..5cc5517f 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -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. diff --git a/web/login/login_own_addressbooks.xhtml b/web/login/login_own_addressbooks.xhtml index 7f2e1242..561a1c79 100644 --- a/web/login/login_own_addressbooks.xhtml +++ b/web/login/login_own_addressbooks.xhtml @@ -18,8 +18,15 @@ #{msg.TABLE_HEADER_LIST_OWN_ADDRESSBOOKS} - - +

+ + +
+ +
+ + +