]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Continued a bit: (please cherry-pick)
authorRoland Häder <roland@mxchange.org>
Mon, 8 Aug 2016 16:10:15 +0000 (18:10 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 8 Aug 2016 17:48:21 +0000 (19:48 +0200)
- also here use isEmpty()

src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebSessionBean.java
web/admin/cellphone/admin_contact_cellphone_list.xhtml

index 0411a6ba3632dfc43a4b9fb9e277f6651c290878..436d986a78322b382bca4594abb877077b18c551 100644 (file)
@@ -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();
        }
index e3e4aa93143926b209407cd991c0b5708aa77b8d..b319d1e620fd0a1000e6518bf96daae357f15eb6 100644 (file)
@@ -15,7 +15,7 @@
                </ui:define>
 
                <ui:define name="content">
-                       <h:dataTable id="table_list_cellphones" var="cellphone" value="#{phoneController.allCellphones()}" styleClass="table_big" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CELLPHONES}" rendered="#{phoneController.hasCellphones()}">
+                       <h:dataTable id="table_list_cellphones" var="cellphone" value="#{phoneController.allCellphones()}" styleClass="table_big" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CELLPHONES}" rendered="#{not phoneController.allCellphones().isEmpty()}">
                                <h:column>
                                        <f:facet name="header">
                                                <h:outputText value="#{msg.ADMIN_SHOW_CELLPHONE_ID}" />