<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>
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;
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
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
//* 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
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
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;
*/
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>
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;
//* 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
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;
*/
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>
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
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
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}" />
<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>
<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>