]> git.mxchange.org Git - jjobs-war.git/commitdiff
Continued a bit:
authorRoland Häder <roland@mxchange.org>
Fri, 20 May 2016 15:36:54 +0000 (17:36 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 26 May 2016 15:17:58 +0000 (17:17 +0200)
- first @Oberserves, then final
- added simple birthday input field
- added i18n strings
- added birthday to export as well
- added observer method afterUserConfirmedAccount() to update lists for
- added javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE to make sure time-zone problems are fixed
- fixed some messages, wrong stuff there

Signed-off-by: Roland Häder <roland@mxchange.org>
nbproject/faces-config.NavData
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionController.java
src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java
src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionController.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/templates/contact/form_contact_data.tpl
web/WEB-INF/web.xml
web/admin/contact/admin_contact_export.xhtml

index 0da39fd7aee1ed3af93661a495081282489f5175..ddb627aac891a9831397680007572824516c6f3e 100644 (file)
@@ -2,67 +2,67 @@
 <Scene Scope="Project" version="2">
     <Scope Scope="Faces Configuration Only"/>
     <Scope Scope="Project">
-        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="400" y="900" zoom="true"/>
-        <Node id="admin/contact/admin_contact_show.xhtml" x="900" y="900" zoom="true"/>
-        <Node id="privacy.xhtml" x="2150" y="300" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="2150" y="150" zoom="true"/>
-        <Node id="guest/user/show_addressbook.xhtml" x="1900" y="600" zoom="true"/>
-        <Node id="admin/user/admin_user_show.xhtml" x="150" y="150" zoom="true"/>
-        <Node id="admin/index.xhtml" x="1900" y="150" zoom="true"/>
-        <Node id="user/login_own_addressbooks.xhtml" x="900" y="150" zoom="true"/>
-        <Node id="user/login_user_data_saved.xhtml" x="900" y="750" zoom="true"/>
-        <Node id="admin/admin_logout.xhtml" x="650" y="450" zoom="true"/>
-        <Node id="user/login_data_saved.xhtml" x="900" y="450" zoom="true"/>
-        <Node id="admin/user/admin_user_unlock.xhtml" x="1400" y="600" zoom="true"/>
-        <Node id="index.xhtml" x="400" y="150" zoom="true"/>
-        <Node id="guest/user/user_list.xhtml" x="900" y="1050" zoom="true"/>
-        <Node id="user/login_edit_user_data.xhtml" x="400" y="1200" zoom="true"/>
-        <Node id="admin/admin_category_delete.xhtml" x="150" y="300" zoom="true"/>
-        <Node id="*" x="1650" y="600" zoom="true"/>
-        <Node id="user/login_index.xhtml" x="1150" y="600" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="650" y="900" zoom="true"/>
-        <Node id="guest/user/lost_passwd.xhtml" x="400" y="1350" zoom="true"/>
-        <Node id="guest/user/register_done.xhtml" x="1150" y="900" zoom="true"/>
-        <Node id="guest/user/show_addressbook_entries.xhtml" x="1150" y="300" zoom="true"/>
-        <Node id="user/login.xhtml" x="400" y="450" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="650" y="300" zoom="true"/>
-        <Node id="admin/country/admin_country_list.xhtml" x="150" y="1500" zoom="true"/>
-        <Node id="login/login_edit_user_data.xhtml" x="1650" y="750" zoom="true"/>
-        <Node id="guest/user/login_error.xhtml" x="150" y="600" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="1400" y="750" zoom="true"/>
-        <Node id="user/login_change_password.xhtml" x="900" y="600" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="1150" y="750" zoom="true"/>
-        <Node id="admin/contact/admin_contact_export.xhtml" x="2150" y="450" zoom="true"/>
-        <Node id="guest/user/user_profile.xhtml" x="2650" y="150" zoom="true"/>
-        <Node id="guest/user/confirm_account.xhtml" x="150" y="750" zoom="true"/>
-        <Node id="exception.xhtml" x="1650" y="150" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="150" y="1050" zoom="true"/>
-        <Node id="admin/user/admin_user_delete.xhtml" x="650" y="1050" zoom="true"/>
-        <Node id="login/login_index.xhtml" x="2400" y="150" zoom="true"/>
-        <Node id="admin/user/admin_user_edit.xhtml" x="1150" y="150" zoom="true"/>
-        <Node id="guest/user/register_page2.xhtml" x="1150" y="450" zoom="true"/>
-        <Node id="terms.xhtml" x="150" y="450" zoom="true"/>
-        <Node id="admin/contact/admin_contact_edit.xhtml" x="1400" y="450" zoom="true"/>
-        <Node id="admin/contact/admin_contact_list.xhtml" x="2400" y="300" zoom="true"/>
-        <Node id="admin/admin_user_add.xhtml" x="1900" y="300" zoom="true"/>
-        <Node id="admin/user/admin_user_list.xhtml" x="650" y="1200" zoom="true"/>
-        <Node id="admin/country/admin_country_delete.xhtml" x="400" y="600" zoom="true"/>
-        <Node id="user/login_change_personal_data.xhtml" x="900" y="300" zoom="true"/>
-        <Node id="logout.xhtml" x="650" y="600" zoom="true"/>
-        <Node id="admin/country/admin_country_edit.xhtml" x="150" y="1350" zoom="true"/>
-        <Node id="guest/user/resend_link.xhtml" x="650" y="150" zoom="true"/>
-        <Node id="user/login_add_addressbook.xhtml" x="150" y="900" zoom="true"/>
-        <Node id="user/login_contact_data_saved.xhtml" x="1650" y="450" zoom="true"/>
-        <Node id="user/user_profile.xhtml" x="650" y="750" zoom="true"/>
-        <Node id="admin/contact/admin_contact_delete.xhtml" x="1900" y="450" zoom="true"/>
-        <Node id="imprint.xhtml" x="1400" y="300" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="400" y="300" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="400" y="1050" zoom="true"/>
-        <Node id="guest/user/login.xhtml" x="150" y="1200" zoom="true"/>
-        <Node id="admin/admin_product_delete.xhtml" x="1400" y="900" zoom="true"/>
-        <Node id="guest/user/register.xhtml" x="1400" y="150" zoom="true"/>
-        <Node id="user/login_change_email_address.xhtml" x="1650" y="300" zoom="true"/>
-        <Node id="user/login/login_data_saved.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="admin/contact/admin_contact_show.xhtml" x="400" y="900" zoom="true"/>
+        <Node id="privacy.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="400" y="300" zoom="true"/>
+        <Node id="guest/user/show_addressbook.xhtml" x="1400" y="900" zoom="true"/>
+        <Node id="admin/user/admin_user_show.xhtml" x="150" y="1050" zoom="true"/>
+        <Node id="admin/index.xhtml" x="400" y="600" zoom="true"/>
+        <Node id="user/login_own_addressbooks.xhtml" x="650" y="450" zoom="true"/>
+        <Node id="user/login_user_data_saved.xhtml" x="900" y="150" zoom="true"/>
+        <Node id="admin/admin_logout.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="user/login_data_saved.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="admin/user/admin_user_unlock.xhtml" x="2400" y="150" zoom="true"/>
+        <Node id="index.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="guest/user/user_list.xhtml" x="650" y="600" zoom="true"/>
+        <Node id="user/login_edit_user_data.xhtml" x="1400" y="450" zoom="true"/>
+        <Node id="*" x="400" y="150" zoom="true"/>
+        <Node id="admin/admin_category_delete.xhtml" x="1650" y="300" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="1900" y="150" zoom="true"/>
+        <Node id="user/login_index.xhtml" x="1150" y="900" zoom="true"/>
+        <Node id="guest/user/lost_passwd.xhtml" x="2150" y="150" zoom="true"/>
+        <Node id="guest/user/register_done.xhtml" x="150" y="750" zoom="true"/>
+        <Node id="guest/user/show_addressbook_entries.xhtml" x="150" y="450" zoom="true"/>
+        <Node id="user/login.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="admin/country/admin_country_list.xhtml" x="1400" y="600" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="650" y="1200" zoom="true"/>
+        <Node id="login/login_edit_user_data.xhtml" x="1900" y="600" zoom="true"/>
+        <Node id="guest/user/login_error.xhtml" x="2150" y="300" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="150" y="150" zoom="true"/>
+        <Node id="user/login_change_password.xhtml" x="400" y="1050" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="900" y="900" zoom="true"/>
+        <Node id="admin/contact/admin_contact_export.xhtml" x="900" y="600" zoom="true"/>
+        <Node id="guest/user/user_profile.xhtml" x="1150" y="750" zoom="true"/>
+        <Node id="guest/user/confirm_account.xhtml" x="650" y="900" zoom="true"/>
+        <Node id="exception.xhtml" x="1150" y="600" zoom="true"/>
+        <Node id="admin/user/admin_user_delete.xhtml" x="150" y="1500" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="1650" y="750" zoom="true"/>
+        <Node id="login/login_index.xhtml" x="1400" y="300" zoom="true"/>
+        <Node id="guest/user/register_page2.xhtml" x="400" y="1200" zoom="true"/>
+        <Node id="admin/user/admin_user_edit.xhtml" x="2650" y="150" zoom="true"/>
+        <Node id="terms.xhtml" x="1650" y="150" zoom="true"/>
+        <Node id="admin/contact/admin_contact_list.xhtml" x="150" y="300" zoom="true"/>
+        <Node id="admin/contact/admin_contact_edit.xhtml" x="2150" y="450" zoom="true"/>
+        <Node id="admin/user/admin_user_list.xhtml" x="1900" y="300" zoom="true"/>
+        <Node id="admin/admin_user_add.xhtml" x="1650" y="450" zoom="true"/>
+        <Node id="admin/country/admin_country_delete.xhtml" x="900" y="1050" zoom="true"/>
+        <Node id="user/login_change_personal_data.xhtml" x="1900" y="450" zoom="true"/>
+        <Node id="logout.xhtml" x="900" y="750" zoom="true"/>
+        <Node id="admin/country/admin_country_edit.xhtml" x="150" y="1200" zoom="true"/>
+        <Node id="guest/user/resend_link.xhtml" x="1400" y="150" zoom="true"/>
+        <Node id="user/login_add_addressbook.xhtml" x="400" y="1350" zoom="true"/>
+        <Node id="user/login_contact_data_saved.xhtml" x="650" y="150" zoom="true"/>
+        <Node id="admin/contact/admin_contact_delete.xhtml" x="1150" y="150" zoom="true"/>
+        <Node id="user/user_profile.xhtml" x="650" y="1050" zoom="true"/>
+        <Node id="imprint.xhtml" x="1650" y="600" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="150" y="900" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="admin/admin_product_delete.xhtml" x="900" y="300" zoom="true"/>
+        <Node id="guest/user/login.xhtml" x="2400" y="300" zoom="true"/>
+        <Node id="guest/user/register.xhtml" x="150" y="1350" zoom="true"/>
+        <Node id="user/login_change_email_address.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="user/login/login_data_saved.xhtml" x="1400" y="750" zoom="true"/>
     </Scope>
     <Scope Scope="All Faces Configurations"/>
 </Scene>
index 7f86bc6c10ded27c7ffe80da19302ef0e8d5b5e9..26c1c493222c5fa30f1518277583cd608ce10228 100644 (file)
@@ -49,6 +49,7 @@ import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
+import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent;
 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
 import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
@@ -283,10 +284,10 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                        throw new NullPointerException("event is null"); //NOI18N
                } else if (event.getUpdatedContact() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("event.updatedUser is null"); //NOI18N
+                       throw new NullPointerException("event.updatedContact is null"); //NOI18N
                } else if (event.getUpdatedContact().getContactId() == null) {
                        // userId is null
-                       throw new NullPointerException("event.updatedUser.userId is null"); //NOI18N
+                       throw new NullPointerException("event.updatedContact.contactId is null"); //NOI18N
                } else if (event.getUpdatedContact().getContactId() < 1) {
                        // Not avalid id
                        throw new IllegalArgumentException(MessageFormat.format("contactId of contact={0} is not valid: {1}", event.getUpdatedContact(), event.getUpdatedContact().getContactId())); //NOI18N
@@ -329,10 +330,10 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                        throw new NullPointerException("event is null"); //NOI18N
                } else if (event.getRegisteredUser() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("event.user is null"); //NOI18N
+                       throw new NullPointerException("event.registeredUser is null"); //NOI18N
                } else if (event.getRegisteredUser().getUserId() == null) {
                        // userId is null
-                       throw new NullPointerException("event.user.userId is null"); //NOI18N
+                       throw new NullPointerException("event.registeredUser.userId is null"); //NOI18N
                } else if (event.getRegisteredUser().getUserId() < 1) {
                        // Not avalid id
                        throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getRegisteredUser(), event.getRegisteredUser().getUserId())); //NOI18N
@@ -357,6 +358,49 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                //* NOISY-DEBUG: */ System.out.println("ContactWebBean:afterRegistration: EXIT!"); //NOI18N
        }
 
+       @Override
+       public void afterUserConfirmedAccount (@Observes final UserConfirmedAccountEvent event) {
+               // Trace message
+               //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("ContactWebBean:afterAdminUpdatedContactDataEvent: event={0} - CALLED!", event)); //NOI18N
+
+               // event should not be null
+               if (null == event) {
+                       // Throw NPE
+                       throw new NullPointerException("event is null"); //NOI18N
+               } else if (event.getConfirmedUser() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("event.confirmedUser is null"); //NOI18N
+               } else if (event.getConfirmedUser().getUserId() == null) {
+                       // userId is null
+                       throw new NullPointerException("event.confirmedUser.userId is null"); //NOI18N
+               } else if (event.getConfirmedUser().getUserId() < 1) {
+                       // Not avalid id
+                       throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getConfirmedUser(), event.getConfirmedUser().getUserId())); //NOI18N
+               }
+
+               // "Cache" contact instance
+               Contact contact = event.getConfirmedUser().getUserContact();
+
+               // Get iterator from list
+               Iterator<Contact> iterator = this.contactList.iterator();
+
+               // "Walk" through all entries
+               while (iterator.hasNext()) {
+                       // Get next element
+                       Contact next = iterator.next();
+
+                       // Is id number the same?
+                       if (Objects.equals(contact.getContactId(), next.getContactId())) {
+                               // Found entry, so remove it and abort
+                               this.contactList.remove(next);
+                               break;
+                       }
+               }
+
+               // Add contact to list
+               this.contactList.add(contact);
+       }
+
        @Override
        public void afterUserLogin (@Observes final UserLoggedInEvent event) {
                // Trace message
@@ -368,10 +412,10 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                        throw new NullPointerException("event is null"); //NOI18N
                } else if (event.getLoggedInUser() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("event.user is null"); //NOI18N
+                       throw new NullPointerException("event.loggedInUser is null"); //NOI18N
                } else if (event.getLoggedInUser().getUserId() == null) {
                        // userId is null
-                       throw new NullPointerException("event.user.userId is null"); //NOI18N
+                       throw new NullPointerException("event.loggedInUser.userId is null"); //NOI18N
                } else if (event.getLoggedInUser().getUserId() < 1) {
                        // Not avalid id
                        throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getLoggedInUser(), event.getLoggedInUser().getUserId())); //NOI18N
index dd508b54f8c13671a5b55144b1be874854752b0d..4a3215007719599cbc9962f1aacc18dd9265d962 100644 (file)
@@ -26,6 +26,7 @@ import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
 import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
 import org.mxchange.jcountry.data.Country;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
+import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent;
 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
 import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
@@ -63,6 +64,13 @@ public interface JobsContactWebSessionController extends Serializable {
         */
        void afterAdminAddedUserEvent (final AdminAddedUserEvent event);
 
+       /**
+        * Event observer when user confirmed account.
+        * <p>
+        * @param event Event being fired
+        */
+       void afterUserConfirmedAccount (final UserConfirmedAccountEvent event);
+
        /**
         * Updates all data from bean in given contact instance
         * <p>
index de3bba0a729581d9d1b811b0d224f77736238715..afeadabd85e20adde955e66bd8e7da9e88444084 100644 (file)
@@ -40,6 +40,7 @@ import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.contact.JobsContactWebSessionController;
 import org.mxchange.jjobs.beans.login.JobsUserLoginWebSessionController;
 import org.mxchange.jjobs.beans.register.JobsUserRegisterWebSessionController;
+import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent;
 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
 import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
@@ -304,6 +305,46 @@ public class JobsUserWebSessionBean extends BaseJobsController implements JobsUs
                //* NOISY-DEBUG: */ System.out.println("UserWebBean:afterRegistration: EXIT!"); //NOI18N
        }
 
+       @Override
+       public void afterUserConfirmedAccount (@Observes final UserConfirmedAccountEvent event) {
+               // Trace message
+               //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("ContactWebBean:afterAdminUpdatedContactDataEvent: event={0} - CALLED!", event)); //NOI18N
+
+               // event should not be null
+               if (null == event) {
+                       // Throw NPE
+                       throw new NullPointerException("event is null"); //NOI18N
+               } else if (event.getConfirmedUser() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("event.confirmedUser is null"); //NOI18N
+               } else if (event.getConfirmedUser().getUserId() == null) {
+                       // userId is null
+                       throw new NullPointerException("event.confirmedUser.userId is null"); //NOI18N
+               } else if (event.getConfirmedUser().getUserId() < 1) {
+                       // Not avalid id
+                       throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getConfirmedUser(), event.getConfirmedUser().getUserId())); //NOI18N
+               }
+
+               // Get iterator from list
+               Iterator<User> iterator = this.userList.iterator();
+
+               // "Walk" through all entries
+               while (iterator.hasNext()) {
+                       // Get next element
+                       User next = iterator.next();
+
+                       // Is id number the same?
+                       if (Objects.equals(event.getConfirmedUser().getUserId(), next.getUserId())) {
+                               // Found entry, so remove it and abort
+                               this.userList.remove(next);
+                               break;
+                       }
+               }
+
+               // Add contact to list
+               this.userList.add(event.getConfirmedUser());
+       }
+
        @Override
        public void afterUserLogin (@Observes final UserLoggedInEvent event) {
                // Trace message
index 623e3fa3bfee5d8a61fe58b7560ccde70a356c27..ba6249832fae7ed4aec189e5c2a3037e891bad6c 100644 (file)
@@ -20,6 +20,7 @@ import java.io.Serializable;
 import java.util.List;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
+import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent;
 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
 import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
@@ -64,6 +65,13 @@ public interface JobsUserWebSessionController extends Serializable {
         */
        void afterAdminUpdatedUserDataEvent (final AdminUpdatedUserDataEvent event);
 
+       /**
+        * Event observer when user confirmed account.
+        * <p>
+        * @param event Event being fired
+        */
+       void afterUserConfirmedAccount (final UserConfirmedAccountEvent event);
+
        /**
         * Listens to fired event when user updated personal data
         * <p>
index 78e601d2b8ada6fee0e96ace4caa062832e46660..1bcc16761e68672b4945dd1709681cafa5d37f28 100644 (file)
@@ -517,3 +517,5 @@ ADMIN_EXPORT_CONTACTS_TIMEOUT_WARNING=Bei sehr gro\u00dfen Datenmengen kann es e
 BUTTON_ADMIN_EXPORT_CONTACTS_CSV=Alle Daten als CSV-Datei exportieren
 LINK_ADMIN_EXPORT_CONTACT=Daten exportieren
 LINK_ADMIN_EXPORT_CONTACT_TITLE=Kontaktdaten exportieren
+PERSONAL_DATA_BIRTHDAY=Geburtsdatum (dd.mm.jjjj):
+BIRTHDAY_PATTERN=dd.MM.yyyy
index c075cd777fccce7efad8754eb2aab06140e62ec1..f796d54ddbfa6f10ad4df60289be146624a0b21b 100644 (file)
@@ -518,3 +518,5 @@ ADMIN_EXPORT_CONTACTS_TIMEOUT_WARNING=Big data amount may lead to timeouts. You
 BUTTON_ADMIN_EXPORT_CONTACTS_CSV=Export all data as CSV file
 LINK_ADMIN_EXPORT_CONTACT=Export data
 LINK_ADMIN_EXPORT_CONTACT_TITLE=Export contact data
+PERSONAL_DATA_BIRTHDAY=Birthday (mm-dd-yyyy):
+BIRTHDAY_PATTERN=MM-dd-yyyy
index 55d2234c5aa601718b89bdd488970a93e7458f0e..1e826c36afc01ff69bb1a2e5ce7a83d82b2b64f0 100644 (file)
@@ -3,7 +3,8 @@
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:p="http://primefaces.org/ui">
 
        <div class="para notice">
                #{msg.PERSONAL_DATA_MINIMUM_NOTICE}
                                <div class="clear"></div>
                        </div>
 
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="birthday" value="#{msg.PERSONAL_DATA_BIRTHDAY}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText styleClass="input" id="birthday" value="#{contactController.birthday}" required="true" size="10" validator="BirthdayValidator">
+                                               <f:convertDateTime for="birthday" pattern="#{msg.BIRTHDAY_PATTERN}" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <h:message for="birthday" errorClass="errors" fatalClass="errors" warnClass="errors" showDetail="false" />
+
                        <div class="table_row">
                                <div class="table_left">
                                        <h:outputLabel for="country" value="#{msg.PERSONAL_DATA_COUNTRY_CODE}" />
index 3d5118787c4d5bfa86a52196e3b219a040d9ee0d..aa65497ccda2bfd1a5cad8e5a0a295894dce8dbd 100644 (file)
         <param-name>is_resend_confirm_link_enabled</param-name>
         <param-value>true</param-value>
     </context-param>
+    <context-param>
+        <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
+        <param-value>true</param-value>
+    </context-param>
     <servlet>
         <servlet-name>Faces Servlet</servlet-name>
         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
index 91b6c58c51d26ab0bba52c8f53e98aa01d690fbf..af009469bc7f812e4207d3600035f20bdff8a244 100644 (file)
                                                <h:outputText value="#{contact.contactEmailAddress}" />
                                        </p:column>
 
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />
+                                               </f:facet>
+
+                                               <h:outputText id="contactBirthday" value="#{contact.contactBirthday}">
+                                                       <f:convertDateTime for="contactBirthday" type="date" dateStyle="medium" />
+                                               </h:outputText>
+                                       </p:column>
+
                                        <p:column>
                                                <f:facet name="header">
                                                        <h:outputText value="#{msg.ADMIN_CONTACT_CELLPHONE_NUMBER}" />
                                                </f:facet>
 
                                                <h:outputText id="contactCreated" value="#{contact.contactCreated.time}">
-                                                       <f:convertDateTime for="contactCreated" type="both" timeStyle="short" dateStyle="short" />
+                                                       <f:convertDateTime for="contactCreated" type="both" timeStyle="short" dateStyle="short" locale="#{localizationController.locale}" />
                                                </h:outputText>
                                        </p:column>
                                </p:dataTable>