]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Tue, 13 Oct 2015 10:06:26 +0000 (12:06 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 13 Oct 2015 10:06:26 +0000 (12:06 +0200)
- 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 <roland@mxchange.org>

nbproject/faces-config.NavData
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/WEB-INF/faces-config.xml
web/WEB-INF/templates/generic/form_personal_data.tpl
web/login/login_show_addressbook.xhtml

index f41aac60d6c10a7f6f2bf301d063a804bb54b8a8..1edfbee9b04986846313ec49b9ee1c5c87f43960 100644 (file)
@@ -23,8 +23,8 @@
         <Node id="login/login_other_addressbooks.xhtml" x="650" y="450" zoom="true"/>
         <Node id="user/lost_passwd.xhtml" x="900" y="300" zoom="true"/>
         <Node id="*" x="650" y="150" zoom="true"/>
-        <Node id="terms.xhtml" x="150" y="600" zoom="true"/>
         <Node id="login/login_own_addressbooks.xhtml" x="400" y="150" zoom="true"/>
+        <Node id="terms.xhtml" x="150" y="600" zoom="true"/>
         <Node id="user/register_done.xhtml" x="1150" y="300" zoom="true"/>
         <Node id="bye.xhtml" x="650" y="300" zoom="true"/>
         <Node id="user/login_error.xhtml" x="1400" y="150" zoom="true"/>
index bade537e4025fdaada0a531fc7500a43e6ec8326..19112ca5f1105738527c0a1f11cc009967188855 100644 (file)
@@ -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;
index 4750f545d7004e5d251c788151a2621aa142ce83..cab2c821cac9ff7cc67646c1e3357b2057cc0262 100644 (file)
@@ -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
+        * <p>
+        * @return Address book id number
+        */
+       public Long getAddressbookId ();
+
+       /**
+        * Setter for address book id number
+        * <p>
+        * @param addressbookId Address book id number
+        */
+       public void setAddressbookId (final Long addressbookId);
 }
index c8dd9bbab048df3f4a93cf310ff4ccbe2d95f2f4..dab0e49d61cea8cfcfa9abd3e7f3516184c38964 100644 (file)
@@ -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.
index 899bf2b7ff44869602180b96849e5888c848edca..77314b27d6b0bf248edc7efde46d54f931b9048f 100644 (file)
@@ -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).
index 2610ac10535412b3e2532614df695d15f3d56478..51d4e5db40a8b544b004ec9359b5d76d36d37a91 100644 (file)
                <validator-id>PhoneNumberValidator</validator-id>
                <validator-class>org.mxchange.jphone.validators.PhoneNumberValidator</validator-class>
        </validator>
+       <validator>
+               <validator-id>AddressbookIdValidator</validator-id>
+               <validator-class>org.mxchange.addressbook.validator.addressbook.AddressbookIdValidator</validator-class>
+       </validator>
        <navigation-rule>
                <from-view-id>*</from-view-id>
                <navigation-case>
                        <from-outcome>login_show_addressbook</from-outcome>
                        <to-view-id>/login/login_show_addressbook.xhtml</to-view-id>
                </navigation-case>
-        <navigation-case>
-         <from-outcome>login_show_addressbook_entries</from-outcome>
-         <to-view-id>/login/login_show_addressbook_entries.xhtml</to-view-id>
-        </navigation-case>
+               <navigation-case>
+                       <from-outcome>login_show_addressbook_entries</from-outcome>
+                       <to-view-id>/login/login_show_addressbook_entries.xhtml</to-view-id>
+               </navigation-case>
        </navigation-rule>
        <application>
                <locale-config>
index 91fe1c7e282cda2d1ebb88f4c3e691fc08a895df..6b4506214a0b492f41d88c20ee09a3525b481611 100644 (file)
@@ -73,8 +73,8 @@
                                </div>
 
                                <div class="table_right">
-                                       <h:inputText class="input" id="houseNumber" size="3" maxlength="5" value="#{userController.houseNumber}" required="true">
-                                               <f:validateLongRange minimum="1" maximum="500" />
+                                       <h:inputText class="input" id="houseNumber" size="3" maxlength="5" value="#{userController.houseNumber}" required="true" validatorMessage="#{msg.ENTERED_HOUSE_NUMBER_INVALID}">
+                                               <f:validateLongRange for="houseNumber" minimum="1" maximum="500" />
                                        </h:inputText>
                                </div>
 
@@ -87,7 +87,9 @@
                                </div>
 
                                <div class="table_right">
-                                       <h:inputText class="input" id="zipCode" size="5" maxlength="6" value="#{userController.zipCode}" required="true" />
+                                       <h:inputText class="input" id="zipCode" size="5" maxlength="6" value="#{userController.zipCode}" required="true" validatorMessage="#{msg.ENTERED_ZIP_CODE_INVALID}">
+                                               <f:validateLongRange for="zipCode" minimum="1" maximum="99999" />
+                                       </h:inputText>
                                </div>
 
                                <div class="clear"></div>
index d2a8d1e4a026104842ff6f3c5653ec051a4311f0..42bfc43ff838a529a73dc9c16594848782e73aae 100644 (file)
@@ -6,6 +6,13 @@
          xmlns:f="http://xmlns.jcp.org/jsf/core"
          >
 
+       <f:metadata>
+               <f:viewParam id="addressbookId" name="addressbook_id" value="#{addressbookController.addressbookId}" required="true" requiredMessage="#{msg.PARAMETER_ADDRESSBOOK_ID_MISSING}" converterMessage="#{msg.PARAMERER_ADDRESSBOOK_ID_INVALID}" validatorMessage="#{PARAMETER_ADDRESSBOOK_ID_NOT_FOUND}">
+                       <f:convertNumber for="addressbookId" type="long" minIntegerDigits="1" maxIntegerDigits="20" />
+                       <f:validator for="addressbookId" validatorId="AddressbookIdValidator" />
+               </f:viewParam>
+       </f:metadata>
+
        <ui:composition template="/WEB-INF/templates/login/login_base.tpl">
                <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_SHOW_ADDRESSBOOK}</ui:define>
 
@@ -14,7 +21,8 @@
                </ui:define>
 
                <ui:define name="content">
-                       Here goes your content.
+                       <h:panelGrid headerClass="table_header" footerClass="table_footer" class="table" columns="3">
+                       </h:panelGrid>
                </ui:define>
        </ui:composition>
 </html>