From: Roland Häder Date: Mon, 8 Aug 2016 16:10:15 +0000 (+0200) Subject: Continued a bit: (please cherry-pick) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1b95ad1a926f848f5fa044b131d5a15b5b85de5f;p=pizzaservice-war.git Continued a bit: (please cherry-pick) - also here use isEmpty() --- diff --git a/src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebSessionBean.java index 0411a6ba..436d986a 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebSessionBean.java @@ -121,6 +121,15 @@ public class PizzaContactPhoneWebSessionBean extends BasePizzaController impleme throw new IllegalArgumentException(MessageFormat.format("event.addedContact.contactId={0} is not valid", event.getAddedContact().getContactId())); //NOI18N //NOI18N } + // Get contact + Contact contact = event.getAddedContact(); + + // Is cellphone set? + if (contact.getContactCellphoneNumber() instanceof DialableCellphoneNumber) { + // Unique-add it + this.uniqueAddCellphoneNumber(contact.getContactCellphoneNumber()); + } + // Clear this bean this.clear(); } diff --git a/web/admin/cellphone/admin_contact_cellphone_list.xhtml b/web/admin/cellphone/admin_contact_cellphone_list.xhtml index e3e4aa93..b319d1e6 100644 --- a/web/admin/cellphone/admin_contact_cellphone_list.xhtml +++ b/web/admin/cellphone/admin_contact_cellphone_list.xhtml @@ -15,7 +15,7 @@ - +