From: Roland Haeder Date: Tue, 13 Oct 2015 10:06:26 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fccfd19a3b50af447da664e00722073538bc8468;p=addressbook-war.git Continued: - added validator for address book id as this is being used in URLs - added validator messages for personal data - added "viewParam" stuff and added bean property "addressbookId" for verification and data retrieval Signed-off-by:Roland Häder --- 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. + +