]> git.mxchange.org Git - jfinancials-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>
Sat, 21 May 2016 12:39:24 +0000 (14:39 +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/addressbook/beans/contact/AddressbookContactWebSessionBean.java
src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionController.java
src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java
src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java
src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.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 3407e86f989c029ef556717baebf76c4adb94346..c510f7d57e4ea0837c10a868ab55b3ceedcd385c 100644 (file)
@@ -2,70 +2,70 @@
 <Scene Scope="Project" version="2">
     <Scope Scope="Faces Configuration Only"/>
     <Scope Scope="Project">
-        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="1900" y="600" zoom="true"/>
-        <Node id="admin/contact/admin_contact_show.xhtml" x="400" y="1350" zoom="true"/>
-        <Node id="privacy.xhtml" x="900" y="600" zoom="true"/>
-        <Node id="guest/user/show_addressbook.xhtml" x="2400" y="150" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="2400" y="300" zoom="true"/>
-        <Node id="admin/user/admin_user_show.xhtml" x="650" y="750" zoom="true"/>
-        <Node id="admin/index.xhtml" x="1400" y="600" zoom="true"/>
-        <Node id="user/login_own_addressbooks.xhtml" x="400" y="150" zoom="true"/>
-        <Node id="user/login_user_data_saved.xhtml" x="400" y="1200" zoom="true"/>
-        <Node id="user/index.xhtml" x="150" y="600" zoom="true"/>
-        <Node id="admin/admin_logout.xhtml" x="650" y="150" zoom="true"/>
-        <Node id="user/login_data_saved.xhtml" x="650" y="450" zoom="true"/>
-        <Node id="admin/user/admin_user_unlock.xhtml" x="900" y="900" zoom="true"/>
-        <Node id="user/login_other_addressbooks.xhtml" x="650" y="1200" zoom="true"/>
-        <Node id="user/login_start_sharing_addressbook.xhtml" x="150" y="750" zoom="true"/>
-        <Node id="guest/user/user_list.xhtml" x="150" y="1350" zoom="true"/>
-        <Node id="index.xhtml" x="1150" y="1050" zoom="true"/>
-        <Node id="user/login_edit_user_data.xhtml" x="150" y="450" zoom="true"/>
-        <Node id="*" x="650" y="1050" zoom="true"/>
-        <Node id="admin/admin_category_delete.xhtml" x="1650" y="600" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="650" y="900" zoom="true"/>
-        <Node id="user/login_index.xhtml" x="1650" y="750" zoom="true"/>
-        <Node id="guest/user/lost_passwd.xhtml" x="1150" y="600" zoom="true"/>
-        <Node id="guest/user/register_done.xhtml" x="400" y="450" zoom="true"/>
-        <Node id="guest/user/show_addressbook_entries.xhtml" x="900" y="300" zoom="true"/>
-        <Node id="user/login.xhtml" x="650" y="600" zoom="true"/>
-        <Node id="admin/country/admin_country_list.xhtml" x="1150" y="150" zoom="true"/>
-        <Node id="login/login_edit_user_data.xhtml" x="1150" y="900" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="900" y="1050" zoom="true"/>
-        <Node id="guest/user/login_error.xhtml" x="900" y="750" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="150" y="1050" zoom="true"/>
-        <Node id="user/login_change_password.xhtml" x="900" y="1200" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="1150" y="450" zoom="true"/>
-        <Node id="admin/contact/admin_contact_export.xhtml" x="1400" y="900" zoom="true"/>
-        <Node id="guest/user/user_profile.xhtml" x="1650" y="450" zoom="true"/>
-        <Node id="guest/user/confirm_account.xhtml" x="400" y="300" zoom="true"/>
-        <Node id="exception.xhtml" x="150" y="150" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="1400" y="450" zoom="true"/>
-        <Node id="admin/user/admin_user_delete.xhtml" x="1150" y="750" zoom="true"/>
-        <Node id="user/login_list_sharing_addressbooks.xhtml" x="2150" y="300" zoom="true"/>
-        <Node id="login/login_index.xhtml" x="2150" y="150" zoom="true"/>
-        <Node id="admin/user/admin_user_edit.xhtml" x="150" y="300" zoom="true"/>
-        <Node id="guest/user/register_page2.xhtml" x="1900" y="300" zoom="true"/>
-        <Node id="terms.xhtml" x="1400" y="150" zoom="true"/>
-        <Node id="admin/contact/admin_contact_list.xhtml" x="400" y="750" zoom="true"/>
-        <Node id="admin/contact/admin_contact_edit.xhtml" x="650" y="1350" zoom="true"/>
-        <Node id="admin/user/admin_user_list.xhtml" x="400" y="600" zoom="true"/>
-        <Node id="admin/country/admin_country_delete.xhtml" x="400" y="1050" zoom="true"/>
-        <Node id="user/login_change_personal_data.xhtml" x="2150" y="450" zoom="true"/>
-        <Node id="admin/country/admin_country_edit.xhtml" x="900" y="450" zoom="true"/>
-        <Node id="logout.xhtml" x="400" y="900" zoom="true"/>
-        <Node id="user/login_add_addressbook.xhtml" x="1650" y="150" zoom="true"/>
-        <Node id="guest/user/resend_link.xhtml" x="150" y="1500" zoom="true"/>
-        <Node id="user/login_contact_data_saved.xhtml" x="150" y="900" zoom="true"/>
-        <Node id="user/user_profile.xhtml" x="1900" y="150" zoom="true"/>
-        <Node id="admin/contact/admin_contact_delete.xhtml" x="2650" y="150" zoom="true"/>
-        <Node id="imprint.xhtml" x="1400" y="750" zoom="true"/>
-        <Node id="user/login_shared_addressbooks.xhtml" x="1900" y="450" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="1150" y="300" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="150" y="1200" zoom="true"/>
-        <Node id="guest/user/login.xhtml" x="1400" y="300" zoom="true"/>
-        <Node id="admin/admin_product_delete.xhtml" x="1650" y="300" zoom="true"/>
-        <Node id="guest/user/register.xhtml" x="650" y="300" zoom="true"/>
-        <Node id="user/login_change_email_address.xhtml" x="900" y="150" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="1400" y="300" zoom="true"/>
+        <Node id="admin/contact/admin_contact_show.xhtml" x="2400" y="150" zoom="true"/>
+        <Node id="privacy.xhtml" x="150" y="300" zoom="true"/>
+        <Node id="guest/user/show_addressbook.xhtml" x="650" y="600" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="400" y="1050" zoom="true"/>
+        <Node id="admin/user/admin_user_show.xhtml" x="1150" y="150" zoom="true"/>
+        <Node id="admin/index.xhtml" x="1400" y="150" zoom="true"/>
+        <Node id="user/login_own_addressbooks.xhtml" x="1400" y="450" zoom="true"/>
+        <Node id="user/login_user_data_saved.xhtml" x="150" y="900" zoom="true"/>
+        <Node id="user/index.xhtml" x="900" y="900" zoom="true"/>
+        <Node id="admin/admin_logout.xhtml" x="650" y="1350" zoom="true"/>
+        <Node id="user/login_data_saved.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="admin/user/admin_user_unlock.xhtml" x="2150" y="300" zoom="true"/>
+        <Node id="user/login_other_addressbooks.xhtml" x="1150" y="900" zoom="true"/>
+        <Node id="user/login_start_sharing_addressbook.xhtml" x="900" y="750" zoom="true"/>
+        <Node id="guest/user/user_list.xhtml" x="1650" y="450" zoom="true"/>
+        <Node id="index.xhtml" x="150" y="1350" zoom="true"/>
+        <Node id="user/login_edit_user_data.xhtml" x="1650" y="750" zoom="true"/>
+        <Node id="admin/admin_category_delete.xhtml" x="150" y="1050" zoom="true"/>
+        <Node id="*" x="1150" y="600" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="user/login_index.xhtml" x="650" y="900" zoom="true"/>
+        <Node id="guest/user/lost_passwd.xhtml" x="150" y="1200" zoom="true"/>
+        <Node id="guest/user/register_done.xhtml" x="150" y="1500" zoom="true"/>
+        <Node id="guest/user/show_addressbook_entries.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="user/login.xhtml" x="150" y="750" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="900" y="300" zoom="true"/>
+        <Node id="login/login_edit_user_data.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="admin/country/admin_country_list.xhtml" x="1650" y="300" zoom="true"/>
+        <Node id="guest/user/login_error.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="400" y="600" 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="900" y="150" zoom="true"/>
+        <Node id="admin/contact/admin_contact_export.xhtml" x="900" y="1050" zoom="true"/>
+        <Node id="guest/user/user_profile.xhtml" x="1150" y="1050" zoom="true"/>
+        <Node id="guest/user/confirm_account.xhtml" x="1900" y="450" zoom="true"/>
+        <Node id="admin/user/admin_user_delete.xhtml" x="150" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="400" y="900" zoom="true"/>
+        <Node id="exception.xhtml" x="2150" y="150" zoom="true"/>
+        <Node id="user/login_list_sharing_addressbooks.xhtml" x="2150" y="450" zoom="true"/>
+        <Node id="login/login_index.xhtml" x="1400" y="900" zoom="true"/>
+        <Node id="guest/user/register_page2.xhtml" x="1150" y="750" zoom="true"/>
+        <Node id="admin/user/admin_user_edit.xhtml" x="650" y="1200" zoom="true"/>
+        <Node id="terms.xhtml" x="1650" y="600" zoom="true"/>
+        <Node id="admin/contact/admin_contact_list.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="admin/contact/admin_contact_edit.xhtml" x="1900" y="150" zoom="true"/>
+        <Node id="admin/user/admin_user_list.xhtml" x="150" y="150" zoom="true"/>
+        <Node id="admin/country/admin_country_delete.xhtml" x="650" y="450" zoom="true"/>
+        <Node id="user/login_change_personal_data.xhtml" x="400" y="300" zoom="true"/>
+        <Node id="logout.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="admin/country/admin_country_edit.xhtml" x="2650" y="150" zoom="true"/>
+        <Node id="guest/user/resend_link.xhtml" x="400" y="150" zoom="true"/>
+        <Node id="user/login_add_addressbook.xhtml" x="1900" y="300" zoom="true"/>
+        <Node id="user/login_contact_data_saved.xhtml" x="1650" y="150" zoom="true"/>
+        <Node id="admin/contact/admin_contact_delete.xhtml" x="650" y="1050" zoom="true"/>
+        <Node id="user/user_profile.xhtml" x="400" y="1200" zoom="true"/>
+        <Node id="imprint.xhtml" x="400" y="1350" zoom="true"/>
+        <Node id="user/login_shared_addressbooks.xhtml" x="2400" y="300" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="1400" y="750" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="1400" y="600" zoom="true"/>
+        <Node id="admin/admin_product_delete.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="guest/user/login.xhtml" x="900" y="1200" zoom="true"/>
+        <Node id="guest/user/register.xhtml" x="650" y="150" zoom="true"/>
+        <Node id="user/login_change_email_address.xhtml" x="1900" y="600" zoom="true"/>
     </Scope>
     <Scope Scope="All Faces Configurations"/>
 </Scene>
index 8e0a08bf665e5e9b519818c44edc0d61ed9a8f04..053fec1ad2426717d403916612728f95d90bdb3e 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 AddressbookContactWebSessionBean extends BaseAddressbookController
                        throw new NullPointerException("event is null"); //NOI18N
                } else if (event.getUpdatedContact() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("event.user is null"); //NOI18N
+                       throw new NullPointerException("event.updatedContact is null"); //NOI18N
                } else if (event.getUpdatedContact().getContactId() == null) {
                        // userId is null
-                       throw new NullPointerException("event.user.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("userId of user={0} is not valid: {1}", event.getUpdatedContact(), event.getUpdatedContact().getContactId())); //NOI18N
@@ -329,10 +330,10 @@ public class AddressbookContactWebSessionBean extends BaseAddressbookController
                        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
@@ -358,7 +359,50 @@ public class AddressbookContactWebSessionBean extends BaseAddressbookController
        }
 
        @Override
-       public void afterUserLogin (final @Observes UserLoggedInEvent event) {
+       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
                //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("ContactWebBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N
 
@@ -368,10 +412,10 @@ public class AddressbookContactWebSessionBean extends BaseAddressbookController
                        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 a7ab2756b9fc37333bba899088cba17a6368f780..1573f14957a2f02fa3442486016ab97167f97ff9 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 AddressbookContactWebSessionController 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 c42460d15c13d7d60a49dffd7f1a6274c9e02860..d93dc8a69f0432ed5dfc51663a7b9e9ee54c01ec 100644 (file)
@@ -262,7 +262,7 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
        }
 
        @Override
-       public void afterRegistrationEvent (final @Observes UserRegisteredEvent event) {
+       public void afterRegistrationEvent (@Observes final UserRegisteredEvent event) {
                // Trace message
                //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("AdminUserWebBean:afterRegistration: event={0} - CALLED!", event)); //NOI18N
 
index 8fa714708781d4154a8a5e46efe888cdb6c63126..0a1a39ccf2ce9776cd1e233f41fef9a449cdc349 100644 (file)
@@ -40,6 +40,7 @@ import org.mxchange.addressbook.beans.register.AddressbookUserRegisterWebSession
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.contact.ContactSessionBeanRemote;
 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;
@@ -311,7 +312,47 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
        }
 
        @Override
-       public void afterUserLogin (final @Observes UserLoggedInEvent event) {
+       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
                //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N
 
index 3b6e94e1ad55011a2f3e9cb4f120b7dd0ee36ea3..c665213fca3e178330469b2c83ab8e89ea138aa9 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 AddressbookUserWebSessionController 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 74ff692782ef4d1b109b188b10c47249b040ca21..9f2f8fad7b1151d23e48293df4b385821bd1935f 100644 (file)
@@ -551,3 +551,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 56efcee8d0e133c6d84db0815db94b60d8b8e38b..9ab200cf3209a5998ad0374e370cb428d7aa701e 100644 (file)
@@ -549,3 +549,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 188d2ea29fe745ba11202179a6c412edb949a057..66625f78e0dcc5f0d31ee4ff5c4b3dac4217c19c 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>