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=e47d66886289a66804fb83b71e98cca1d400189d;p=jfinancials-war.git Continued a bit: (please cherry-pick) - also here use isEmpty() --- diff --git a/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebSessionBean.java index df897fac..da3a5228 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebSessionBean.java @@ -121,6 +121,15 @@ public class AddressbookContactPhoneWebSessionBean extends BaseAddressbookContro 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 @@ - +