]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Continued a bit:
authorRoland Haeder <roland@mxchange.org>
Thu, 21 Apr 2016 20:19:34 +0000 (22:19 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 21 Apr 2016 20:21:08 +0000 (22:21 +0200)
- return type is now updated contact instance
- fixed class/interface imports

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java

index af146c086e9b1adddda7de05198873272341f1c9..97ec5eddd65b6cee6ed64f6d528692c6d29563cd 100644 (file)
@@ -33,12 +33,16 @@ 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.jphone.phonenumbers.fax.DialableFaxNumber;
 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 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)
@@ -182,6 +186,13 @@ public class AddressbookAdminContactWebRequestBean implements AddressbookAdminCo
         */
        private String street;
 
+       /**
+        * An event fired when the administrator has updated contact data
+        */
+       @Inject
+       @Any
+       private Event<AdminUpdatedContactEvent> updatedContactEvent;
+
        /**
         * ZIP code
         */
@@ -228,13 +239,13 @@ public class AddressbookAdminContactWebRequestBean implements AddressbookAdminCo
                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