From fccfd19a3b50af447da664e00722073538bc8468 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 13 Oct 2015 12:06:26 +0200 Subject: [PATCH] =?utf8?q?Continued:=20-=20added=20validator=20for=20addre?= =?utf8?q?ss=20book=20id=20as=20this=20is=20being=20used=20in=20URLs=20-?= =?utf8?q?=20added=20validator=20messages=20for=20personal=20data=20-=20ad?= =?utf8?q?ded=20"viewParam"=20stuff=20and=20added=20bean=20property=20"add?= =?utf8?q?ressbookId"=20for=20verification=20and=20data=20retrieval=20Sign?= =?utf8?q?ed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- nbproject/faces-config.NavData | 2 +- .../beans/addressbook/AddressbookWebBean.java | 15 +++++++++++++++ .../addressbook/AddressbookWebController.java | 14 ++++++++++++++ .../mxchange/localization/bundle_de_DE.properties | 5 +++++ .../mxchange/localization/bundle_en_US.properties | 7 ++++++- web/WEB-INF/faces-config.xml | 12 ++++++++---- .../templates/generic/form_personal_data.tpl | 8 +++++--- web/login/login_show_addressbook.xhtml | 10 +++++++++- 8 files changed, 63 insertions(+), 10 deletions(-) diff --git a/nbproject/faces-config.NavData b/nbproject/faces-config.NavData index f41aac60..1edfbee9 100644 --- a/nbproject/faces-config.NavData +++ b/nbproject/faces-config.NavData @@ -23,8 +23,8 @@ - + diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java index bade537e..19112ca5 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java @@ -67,6 +67,11 @@ public class AddressbookWebBean implements AddressbookWebController { */ private String addressbookName; + /** + * Address book id number (from URL for example) + */ + private Long addressbookId; + /** * Login controller */ @@ -162,6 +167,16 @@ public class AddressbookWebBean implements AddressbookWebController { return this.allEntries(addressbook).size(); } + @Override + public Long getAddressbookId () { + return this.addressbookId; + } + + @Override + public void setAddressbookId (final Long addressbookId) { + this.addressbookId = addressbookId; + } + @Override public String getAddressbookName () { return this.addressbookName; diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java index 4750f545..cab2c821 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java @@ -92,4 +92,18 @@ public interface AddressbookWebController extends Serializable { * @return Size of the entries in address book */ public int allEntriesSize (final Addressbook addressbook); + + /** + * Getter for address book id number + *

+ * @return Address book id number + */ + public Long getAddressbookId (); + + /** + * Setter for address book id number + *

+ * @param addressbookId Address book id number + */ + public void setAddressbookId (final Long addressbookId); } diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index c8dd9bba..dab0e49d 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -185,3 +185,8 @@ ADDRESSBOOK_TOTAL_ENTRIES=Eintr\u00e4ge: PAGE_TITLE_LOGIN_SHOW_ADDRESSBOOK_ENTRIES=Adressbucheintr\u00e4ge zeigen CONTENT_TITLE_LOGIN_SHOW_ADDRESSBOOK_ENTRIES=Alle Adressbuchentr\u00e4ge anzeigen: ADDRESSBOOK_TOTAL_ENTRIES_TITLE=Eintr\u00e4ge im Adressbuch +PARAMETER_ADDRESSBOOK_ID_MISSING=Bitte diese Seite mit Id-Nummer aufrufen. +PARAMERER_ADDRESSBOOK_ID_INVALID=Id-Nummer f\u00fcr Adressbuch ung\u00fcltig. Bitte links weiter navigieren. +ENTERED_HOUSE_NUMBER_INVALID=Die eingegebene Hausnummer ist ung\u00fcltig. +ENTERED_ZIP_CODE_INVALID=Die eingegebene Postleitzahl ist ung\u00fcltig. +PARAMETER_ADDRESSBOOK_ID_NOT_FOUND=Der angeklickte Link ist nicht mehr g\u00fcltig: Adressbuch mit der Id-Nummer nicht gefunden. diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 899bf2b7..77314b27 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -105,7 +105,7 @@ LINK_GUEST_PRIVACY_TITLE=View privacy statement MENU_USER_TITLE=User ENTER_USER_NAME=User name: BUTTON_USER_LOGIN=Login -BUTTON_CONTINUE_STEP_2=Weiter zu Schritt 2 +BUTTON_CONTINUE_STEP_2=Continue to step 2 GUEST_REGISTRATION_ENTER_USER_NAME=Enter user name: GUEST_REGISTRATION_USER_NAME_NOTICE=The user name must only exist once. LINK_GUEST_RESENT_CONFIRMATION_LINK=Resend again the confirmation link? @@ -185,3 +185,8 @@ ADDRESSBOOK_TOTAL_ENTRIES=Entries: PAGE_TITLE_LOGIN_SHOW_ADDRESSBOOK_ENTRIES=Show address book entries CONTENT_TITLE_LOGIN_SHOW_ADDRESSBOOK_ENTRIES=Show all address book entries: ADDRESSBOOK_TOTAL_ENTRIES_TITLE=Entries in address book +PARAMETER_ADDRESSBOOK_ID_MISSING=Please call this web page with id number. +PARAMERER_ADDRESSBOOK_ID_INVALID=Id number for address book invalid. Please continue navigating on left menu. +ENTERED_HOUSE_NUMBER_INVALID=The entered house number is invalid. +ENTERED_ZIP_CODE_INVALID=The entered ZIP code is invalid. +PARAMETER_ADDRESSBOOK_ID_NOT_FOUND=The clicked link is no longer valid: Address book with entered id number does not exist (anymore). diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 2610ac10..51d4e5db 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -19,6 +19,10 @@ PhoneNumberValidator org.mxchange.jphone.validators.PhoneNumberValidator + + AddressbookIdValidator + org.mxchange.addressbook.validator.addressbook.AddressbookIdValidator + * @@ -121,10 +125,10 @@ login_show_addressbook /login/login_show_addressbook.xhtml - - login_show_addressbook_entries - /login/login_show_addressbook_entries.xhtml - + + login_show_addressbook_entries + /login/login_show_addressbook_entries.xhtml + diff --git a/web/WEB-INF/templates/generic/form_personal_data.tpl b/web/WEB-INF/templates/generic/form_personal_data.tpl index 91fe1c7e..6b450621 100644 --- a/web/WEB-INF/templates/generic/form_personal_data.tpl +++ b/web/WEB-INF/templates/generic/form_personal_data.tpl @@ -73,8 +73,8 @@

- - + +
@@ -87,7 +87,9 @@
- + + +
diff --git a/web/login/login_show_addressbook.xhtml b/web/login/login_show_addressbook.xhtml index d2a8d1e4..42bfc43f 100644 --- a/web/login/login_show_addressbook.xhtml +++ b/web/login/login_show_addressbook.xhtml @@ -6,6 +6,13 @@ xmlns:f="http://xmlns.jcp.org/jsf/core" > + + + + + + + #{msg.PAGE_TITLE_LOGIN_SHOW_ADDRESSBOOK} @@ -14,7 +21,8 @@ - Here goes your content. + + -- 2.39.5