From cc047ffb322b052c750d55f9ac06ec2c791473d3 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 21 Apr 2016 22:19:34 +0200 Subject: [PATCH] Continued a bit: - return type is now updated contact instance - fixed class/interface imports MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../contact/JobsAdminContactWebRequestBean.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/java/org/mxchange/jjobs/beans/contact/JobsAdminContactWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/contact/JobsAdminContactWebRequestBean.java index fba60362..b01440c6 100644 --- a/src/java/org/mxchange/jjobs/beans/contact/JobsAdminContactWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/contact/JobsAdminContactWebRequestBean.java @@ -32,11 +32,15 @@ import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.ContactSessionBeanRemote; import org.mxchange.jcontacts.contact.gender.Gender; import org.mxchange.jcontacts.contact.utils.ContactUtils; +import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent; +import org.mxchange.jcontacts.events.contact.update.AdminContactUpdatedEvent; +import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent; import org.mxchange.jcountry.data.Country; import org.mxchange.jjobs.beans.helper.JobsAdminWebRequestController; import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; import org.mxchange.jusercore.events.user.update.AdminUserDataUpdatedEvent; +import org.mxchange.pizzaapplication.beans.helper.PizzaAdminWebRequestController; /** * A user bean (controller) @@ -180,6 +184,13 @@ public class JobsAdminContactWebRequestBean implements JobsAdminContactWebReques */ private String street; + /** + * An event fired when the administrator has updated contact data + */ + @Inject + @Any + private Event updatedContactEvent; + /** * ZIP code */ @@ -226,13 +237,13 @@ public class JobsAdminContactWebRequestBean implements JobsAdminContactWebReques this.updateContactData(contact); // Call EJB for updating contact data - Contact updatedContact = this.contactBean.updateContactData(contact); + Contact updatedContact = this.contactBean.updateContactPersonalData(contact); // Update list this.updateList(updatedContact); // Fire event - this.updatedContactDataEvent.fire(new AdminUserDataUpdatedEvent(updatedContact)); + this.updatedContactDataEvent.fire(new AdminContactUpdatedEvent(updatedContact)); // Return to contact list (for now) return "admin_list_contact"; //NOI18N -- 2.39.5