From: Roland Haeder Date: Fri, 9 Oct 2015 18:58:29 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f1ef77eb1617f115a0cadc8c069a0948e8eb8036;p=jfinancials-war.git Continued: - form adding address books is "basicly finished" - added all its language strings - added bean method createAddressbook() - added field addressbookName - added a description to web.xml - registered newly added validator for address book names (doubles are allowed) --- diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java index 7bd707f9..5661a925 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java @@ -50,6 +50,11 @@ public class AddressbookWebBean implements AddressbookWebController { */ private List addressbookList; + /** + * Name of the address book + */ + private String addressbookName; + /** * Remote addressbook bean */ @@ -101,4 +106,19 @@ public class AddressbookWebBean implements AddressbookWebController { // Check if the list is filled return (!this.addressbookList.isEmpty()); } + + @Override + public void addAddressbook() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public String getAddressbookName() { + return this.addressbookName; + } + + @Override + public void setAddressbookName(final String addressbookName) { + this.addressbookName = addressbookName; + } } diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java index f8c076df..56af2ea7 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java @@ -31,5 +31,25 @@ public interface AddressbookWebController extends Serializable { *

* @return Whether the user has created at least one addressbook */ - public boolean hasCreatedAddressbooks (); + public boolean hasCreatedAddressbooks(); + + /** + * Creates a new address book with a name. For this method to work it is + * vital that the user is logged into his/her account. + */ + public void addAddressbook(); + + /** + * Getter for address book name + *

+ * @return Address book name + */ + public String getAddressbookName(); + + /** + * Setter for address book name + *

+ * @param addressbookName Address book name + */ + public void setAddressbookName(final String addressbookName); } diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 1f23fbd8..f3a6603d 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -164,3 +164,8 @@ LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK_TITLE=Legen Sie ein weiteres Adressbuch an LINK_LOGIN_ADD_FIRST_ADDRESSBOOK_TITLE=Legen Sie Ihr erstes Adressbuch an. Dies ist f\u00fcr das Verwalten von Kontakten erforderlich. PAGE_TITLE_LOGIN_ADD_ADDRESSBOOK=Neues Adressbuch anlegen CONTENT_TITLE_LOGIN_ADD_ADDRESSBOOK=Legen Sie ein neues Addressbuch an: +FORM_LOGIN_ADD_ADDRESSBOOK_TITLE=Ein neues Adressbuch anlegen: +LOGIN_ADDRESSBOOK_NAME_REQUIRED_MESSAGE=Bitte geben Sie einen Namen fuer Ihr Adressbuch ein. Beispiele: Private Kontakte +LOGIN_ENTER_ADDRESSBOOK_NAME_TITLE=Vergeben Sie hier einen Name fuer Ihr Adressbuch. Beispiel: Private Kontakte +BUTTON_LOGIN_ADD_ADDRESSBOOK=Adressbuch anlegen +LOGIN_ENTER_ADDRESSBOOK_NAME=Names des Adressbuches: diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index dff016b0..e1fc0286 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -163,4 +163,9 @@ 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. PAGE_TITLE_LOGIN_ADD_ADDRESSBOOK=Create new address book -CONTENT_TITLE_LOGIN_ADD_ADDRESSBOOK=Create a new address book: +CONTENT_TITLE_LOGIN_ADD_ADDRESSBOOK=You can create a new address book here: +FORM_LOGIN_ADD_ADDRESSBOOK_TITLE=Create a new address book: +LOGIN_ADDRESSBOOK_NAME_REQUIRED_MESSAGE=Please enter a name for your address book. Examples: Private contacts +LOGIN_ENTER_ADDRESSBOOK_NAME_TITLE=Here you can give your address book a name. Example: Private contacts +BUTTON_LOGIN_ADD_ADDRESSBOOK=Create address book +LOGIN_ENTER_ADDRESSBOOK_NAME=Name of address book: diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 1386e115..7d1d930e 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -11,6 +11,10 @@ NameValidator org.mxchange.jcoreee.validator.string.names.NameValidator + + AddressbookNameValidator + org.mxchange.addressbook.validator.names.AddressbookNameValidator + * diff --git a/web/WEB-INF/glassfish-web.xml b/web/WEB-INF/glassfish-web.xml index 80dc0809..b70617b4 100644 --- a/web/WEB-INF/glassfish-web.xml +++ b/web/WEB-INF/glassfish-web.xml @@ -1,11 +1,11 @@ - /addressbook-war - - - - Keep a copy of the generated servlet class' java code. - - + /addressbook-war + + + + Keep a copy of the generated servlet class' java code. + + diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml index f8273612..4daac621 100644 --- a/web/WEB-INF/web.xml +++ b/web/WEB-INF/web.xml @@ -1,69 +1,70 @@ - Addressbook Application v1.0 - - javax.faces.PROJECT_STAGE - Development - - - Faces Servlet - javax.faces.webapp.FacesServlet - 1 - - - Faces Servlet - /faces/* - - - + An online address book application to share private and business memebers between all members. It is also possible that the user's profile can be made visible to outside. + Addressbook Application v1.0 + + javax.faces.PROJECT_STAGE + Development + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + 30 - - - faces/index.xhtml - - - LoginConstraint - - loginArea - Login area - /llogin/* - - - User Authentication - user - - - - AdminConstraint - - admin - Administrative area - /admin/* - - - Admin authentication - admin - - - - FORM - Loginbereich / Login area - - /user/login.xhtml - /user/login_error.xhtml - - - - A logged-in user that has previously registered himself/herself. - user - - - tpl - text/plain - - - Administrativre rule - admin - + + + faces/index.xhtml + + + LoginConstraint + + loginArea + Login area + /llogin/* + + + User Authentication + user + + + + AdminConstraint + + admin + Administrative area + /admin/* + + + Admin authentication + admin + + + + FORM + Loginbereich / Login area + + /user/login.xhtml + /user/login_error.xhtml + + + + A logged-in user that has previously registered himself/herself. + user + + + tpl + text/plain + + + Administrativre rule + admin + diff --git a/web/login/login_add_addressbook.xhtml b/web/login/login_add_addressbook.xhtml index 219d8749..30f86daf 100644 --- a/web/login/login_add_addressbook.xhtml +++ b/web/login/login_add_addressbook.xhtml @@ -15,7 +15,28 @@ - +

+
+ #{msg.FORM_LOGIN_ADD_ADDRESSBOOK_TITLE} +
+ +
+
+ +
+ +
+ + + +
+
+ + +