From e47d66886289a66804fb83b71e98cca1d400189d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 8 Aug 2016 18:10:15 +0200 Subject: [PATCH] Continued a bit: (please cherry-pick) - also here use isEmpty() --- .../phone/AddressbookContactPhoneWebSessionBean.java | 9 +++++++++ web/admin/cellphone/admin_contact_cellphone_list.xhtml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) 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 @@ - + -- 2.39.5