]> git.mxchange.org Git - jjobs-war.git/commitdiff
Continued with some rewrites: (please cherry-pick)
authorRoland Häder <roland@mxchange.org>
Tue, 9 Aug 2016 15:36:29 +0000 (17:36 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 17 Aug 2016 19:50:35 +0000 (21:50 +0200)
- moved cellPhoneNumber to beanHelper as this is the right place
- introduced copyCellphoneNumberToController() and called it in edit template for having all editable data being set in backing bean

Signed-off-by: Roland Häder <roland@mxchange.org>
13 files changed:
nbproject/faces-config.NavData
src/java/org/mxchange/jjobs/beans/contact/phone/JobsContactPhoneWebSessionBean.java
src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestController.java
src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestHelper.java
src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java
src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestController.java
web/WEB-INF/templates/admin/cellphone/admin_cellphone_data.tpl
web/WEB-INF/templates/admin/cellphone/admin_cellphone_links.tpl
web/WEB-INF/templates/admin/cellphone/admin_form_cellphone_data.tpl
web/admin/cellphone/admin_cellphone_delete.xhtml
web/admin/cellphone/admin_cellphone_edit.xhtml
web/admin/cellphone/admin_cellphone_show.xhtml
web/admin/cellphone/admin_contact_cellphone_unlink.xhtml

index 3031ef63f1403d1b992a79564b069fbc59cbfb08..b2e1f7d8ecf9ca6581a98e25d0e0a029cb105cd8 100644 (file)
@@ -2,75 +2,75 @@
 <Scene Scope="Project" version="2">
     <Scope Scope="Faces Configuration Only"/>
     <Scope Scope="Project">
-        <Node id="user/login_logout.xhtml" x="400" y="150" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="1150" y="900" zoom="true"/>
-        <Node id="admin/cellphone/admin_cellphone_delete.xhtml" x="400" y="1050" zoom="true"/>
-        <Node id="admin/contact/admin_contact_show.xhtml" x="2650" y="300" zoom="true"/>
-        <Node id="privacy.xhtml" x="1900" y="300" zoom="true"/>
-        <Node id="guest/user/show_addressbook.xhtml" x="1400" y="150" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="900" y="450" zoom="true"/>
-        <Node id="admin/user/admin_user_show.xhtml" x="400" y="1500" zoom="true"/>
-        <Node id="admin/index.xhtml" x="650" y="450" zoom="true"/>
-        <Node id="user/login_own_addressbooks.xhtml" x="1150" y="450" zoom="true"/>
-        <Node id="user/login_user_data_saved.xhtml" x="650" y="1050" zoom="true"/>
-        <Node id="admin/cellphone/admin_cellphone_show.xhtml" x="900" y="900" zoom="true"/>
-        <Node id="admin/admin_logout.xhtml" x="1900" y="600" zoom="true"/>
-        <Node id="user/login_data_saved.xhtml" x="1400" y="450" zoom="true"/>
-        <Node id="admin/user/admin_user_unlock.xhtml" x="400" y="450" zoom="true"/>
-        <Node id="admin/cellphone/admin_cellphone_edit.xhtml" x="650" y="1350" zoom="true"/>
-        <Node id="index.xhtml" x="900" y="300" zoom="true"/>
-        <Node id="guest/user/user_list.xhtml" x="150" y="1500" zoom="true"/>
-        <Node id="user/login_edit_user_data.xhtml" x="1150" y="150" zoom="true"/>
-        <Node id="*" x="150" y="300" zoom="true"/>
-        <Node id="admin/admin_category_delete.xhtml" x="1650" y="150" zoom="true"/>
-        <Node id="user/login_index.xhtml" x="650" y="900" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="2400" y="300" zoom="true"/>
-        <Node id="guest/user/lost_passwd.xhtml" x="900" y="750" zoom="true"/>
-        <Node id="guest/user/register_done.xhtml" x="150" y="1350" zoom="true"/>
-        <Node id="guest/user/show_addressbook_entries.xhtml" x="2900" y="150" zoom="true"/>
-        <Node id="user/login.xhtml" x="2150" y="150" zoom="true"/>
-        <Node id="login/login_edit_user_data.xhtml" x="150" y="150" zoom="true"/>
-        <Node id="admin/country/admin_country_list.xhtml" x="400" y="1200" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="2150" y="450" zoom="true"/>
-        <Node id="guest/user/login_error.xhtml" x="150" y="1200" zoom="true"/>
-        <Node id="admin/user/admin_user_export.xhtml" x="1650" y="750" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="user/login_logout.xhtml" x="1650" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="400" y="1200" zoom="true"/>
+        <Node id="admin/cellphone/admin_cellphone_delete.xhtml" x="650" y="150" zoom="true"/>
+        <Node id="admin/contact/admin_contact_show.xhtml" x="150" y="1500" zoom="true"/>
+        <Node id="privacy.xhtml" x="1150" y="750" zoom="true"/>
+        <Node id="guest/user/show_addressbook.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="2400" y="150" zoom="true"/>
+        <Node id="admin/user/admin_user_show.xhtml" x="1900" y="150" zoom="true"/>
+        <Node id="admin/index.xhtml" x="400" y="1050" zoom="true"/>
+        <Node id="user/login_own_addressbooks.xhtml" x="2400" y="450" zoom="true"/>
+        <Node id="user/login_user_data_saved.xhtml" x="1150" y="150" zoom="true"/>
+        <Node id="admin/cellphone/admin_cellphone_show.xhtml" x="150" y="1350" zoom="true"/>
+        <Node id="admin/admin_logout.xhtml" x="1400" y="450" zoom="true"/>
+        <Node id="user/login_data_saved.xhtml" x="150" y="900" zoom="true"/>
+        <Node id="admin/user/admin_user_unlock.xhtml" x="650" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_cellphone_edit.xhtml" x="1400" y="900" zoom="true"/>
+        <Node id="index.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="guest/user/user_list.xhtml" x="1650" y="300" zoom="true"/>
+        <Node id="user/login_edit_user_data.xhtml" x="900" y="1050" zoom="true"/>
+        <Node id="admin/admin_category_delete.xhtml" x="1900" y="600" zoom="true"/>
+        <Node id="*" x="1650" y="750" zoom="true"/>
+        <Node id="user/login_index.xhtml" x="900" y="1200" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="650" y="1350" zoom="true"/>
+        <Node id="guest/user/lost_passwd.xhtml" x="400" y="900" zoom="true"/>
+        <Node id="guest/user/register_done.xhtml" x="1400" y="600" zoom="true"/>
+        <Node id="guest/user/show_addressbook_entries.xhtml" x="2150" y="450" zoom="true"/>
+        <Node id="user/login.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="login/login_edit_user_data.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="1900" y="450" zoom="true"/>
+        <Node id="admin/country/admin_country_list.xhtml" x="2650" y="300" zoom="true"/>
+        <Node id="guest/user/login_error.xhtml" x="2150" y="150" zoom="true"/>
+        <Node id="admin/user/admin_user_export.xhtml" x="400" y="600" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="1400" y="750" zoom="true"/>
         <Node id="guest/user/resend_done.xhtml" x="900" y="600" zoom="true"/>
-        <Node id="user/login_change_password.xhtml" x="2650" y="150" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="1400" y="300" zoom="true"/>
-        <Node id="admin/contact/admin_contact_export.xhtml" x="2400" y="450" zoom="true"/>
-        <Node id="guest/user/user_profile.xhtml" x="400" y="600" zoom="true"/>
-        <Node id="guest/user/confirm_account.xhtml" x="1150" y="300" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="900" y="150" zoom="true"/>
-        <Node id="exception.xhtml" x="1650" y="600" zoom="true"/>
-        <Node id="admin/user/admin_user_delete.xhtml" x="900" y="1050" zoom="true"/>
-        <Node id="login/login_index.xhtml" x="150" y="1050" zoom="true"/>
-        <Node id="admin/user/admin_user_edit.xhtml" x="650" y="150" zoom="true"/>
-        <Node id="guest/user/register_page2.xhtml" x="1400" y="600" zoom="true"/>
-        <Node id="terms.xhtml" x="650" y="600" zoom="true"/>
-        <Node id="admin/contact/admin_contact_list.xhtml" x="150" y="750" zoom="true"/>
-        <Node id="admin/contact/admin_contact_edit.xhtml" x="1400" y="750" zoom="true"/>
-        <Node id="admin/user/admin_user_lock.xhtml" x="1650" y="450" zoom="true"/>
-        <Node id="admin/user/admin_user_list.xhtml" x="1150" y="600" zoom="true"/>
-        <Node id="admin/admin_user_add.xhtml" x="1900" y="450" zoom="true"/>
-        <Node id="admin/country/admin_country_delete.xhtml" x="400" y="300" zoom="true"/>
-        <Node id="user/login_change_personal_data.xhtml" x="1400" y="900" zoom="true"/>
-        <Node id="logout.xhtml" x="2150" y="300" zoom="true"/>
-        <Node id="admin/country/admin_country_edit.xhtml" x="650" y="1200" zoom="true"/>
-        <Node id="guest/user/resend_link.xhtml" x="400" y="900" zoom="true"/>
-        <Node id="user/login_add_addressbook.xhtml" x="1650" y="300" zoom="true"/>
-        <Node id="admin/cellphone/admin_cellphone_list.xhtml" x="150" y="600" zoom="true"/>
-        <Node id="user/login_contact_data_saved.xhtml" x="150" y="1650" zoom="true"/>
-        <Node id="user/user_profile.xhtml" x="1150" y="1050" zoom="true"/>
-        <Node id="admin/contact/admin_contact_delete.xhtml" x="900" y="1200" zoom="true"/>
-        <Node id="imprint.xhtml" x="150" y="900" zoom="true"/>
+        <Node id="user/login_change_password.xhtml" x="900" y="150" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="150" y="750" zoom="true"/>
+        <Node id="admin/contact/admin_contact_export.xhtml" x="400" y="1500" zoom="true"/>
+        <Node id="guest/user/user_profile.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="guest/user/confirm_account.xhtml" x="2900" y="150" zoom="true"/>
+        <Node id="exception.xhtml" x="400" y="150" zoom="true"/>
+        <Node id="admin/user/admin_user_delete.xhtml" x="150" y="300" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="login/login_index.xhtml" x="1900" y="300" zoom="true"/>
+        <Node id="admin/user/admin_user_edit.xhtml" x="900" y="300" zoom="true"/>
+        <Node id="guest/user/register_page2.xhtml" x="1400" y="150" zoom="true"/>
+        <Node id="terms.xhtml" x="2400" y="300" zoom="true"/>
+        <Node id="admin/contact/admin_contact_edit.xhtml" x="2150" y="300" zoom="true"/>
+        <Node id="admin/contact/admin_contact_list.xhtml" x="650" y="1200" zoom="true"/>
+        <Node id="admin/user/admin_user_lock.xhtml" x="1650" y="150" zoom="true"/>
+        <Node id="admin/admin_user_add.xhtml" x="150" y="450" zoom="true"/>
+        <Node id="admin/user/admin_user_list.xhtml" x="650" y="900" zoom="true"/>
+        <Node id="admin/country/admin_country_delete.xhtml" x="2650" y="150" zoom="true"/>
+        <Node id="user/login_change_personal_data.xhtml" x="1150" y="600" zoom="true"/>
+        <Node id="admin/country/admin_country_edit.xhtml" x="1400" y="300" zoom="true"/>
+        <Node id="logout.xhtml" x="1150" y="900" zoom="true"/>
+        <Node id="user/login_add_addressbook.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="guest/user/resend_link.xhtml" x="900" y="900" zoom="true"/>
+        <Node id="admin/cellphone/admin_cellphone_list.xhtml" x="150" y="150" zoom="true"/>
+        <Node id="user/login_contact_data_saved.xhtml" x="150" y="1050" zoom="true"/>
+        <Node id="admin/contact/admin_contact_delete.xhtml" x="1150" y="1050" zoom="true"/>
+        <Node id="user/user_profile.xhtml" x="150" y="1650" zoom="true"/>
+        <Node id="imprint.xhtml" x="150" y="1200" zoom="true"/>
         <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="400" y="1350" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="1150" y="750" zoom="true"/>
-        <Node id="admin/admin_product_delete.xhtml" x="650" y="750" zoom="true"/>
-        <Node id="guest/user/login.xhtml" x="1900" y="150" zoom="true"/>
-        <Node id="guest/user/register.xhtml" x="150" y="450" zoom="true"/>
-        <Node id="user/login_change_email_address.xhtml" x="2400" y="150" zoom="true"/>
-        <Node id="user/login/login_data_saved.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="400" y="300" zoom="true"/>
+        <Node id="guest/user/login.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="admin/admin_product_delete.xhtml" x="650" y="1050" zoom="true"/>
+        <Node id="guest/user/register.xhtml" x="1650" y="600" zoom="true"/>
+        <Node id="user/login_change_email_address.xhtml" x="900" y="750" zoom="true"/>
+        <Node id="user/login/login_data_saved.xhtml" x="650" y="600" zoom="true"/>
     </Scope>
     <Scope Scope="All Faces Configurations"/>
 </Scene>
index 280e3db7e1a0d595d85e78d1f9096681fa39d361..342a3e210f5984294ff90c2b360cc9a1f48c455a 100644 (file)
@@ -36,6 +36,7 @@ import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
 import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
 import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.contact.JobsContactWebSessionController;
+import org.mxchange.jjobs.beans.helper.JobsWebRequestController;
 import org.mxchange.jjobs.beans.phone.JobsAdminPhoneWebRequestController;
 import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote;
 import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
@@ -60,6 +61,12 @@ public class JobsContactPhoneWebSessionBean extends BaseJobsController implement
        @Inject
        private JobsAdminPhoneWebRequestController adminPhoneController;
 
+       /**
+        * Admin helper instance
+        */
+       @Inject
+       private JobsWebRequestController beanHelper;
+
        /**
         * General contact controller
         */
@@ -163,7 +170,7 @@ public class JobsContactPhoneWebSessionBean extends BaseJobsController implement
        @Override
        public List<Contact> allCellphoneContacts () {
                // Get id
-               Long phoneId = this.adminPhoneController.getCellPhoneNumber().getPhoneId();
+               Long phoneId = this.beanHelper.getCellPhoneNumber().getPhoneId();
 
                // Is cache there?
                if (this.contacts.containsKey(phoneId)) {
@@ -176,7 +183,7 @@ public class JobsContactPhoneWebSessionBean extends BaseJobsController implement
                        // "Walk" through all contacts
                        for (final Contact contact : this.contactController.allContacts()) {
                                // Is cellphone instance the same?
-                               if (Objects.equals(contact.getContactCellphoneNumber(), this.adminPhoneController.getCellPhoneNumber())) {
+                               if (Objects.equals(contact.getContactCellphoneNumber(), this.beanHelper.getCellPhoneNumber())) {
                                        // Found one
                                        list.add(contact);
                                }
index 5fbc8d45d8e9db5288c939e2038446012f9efeeb..39ab3655dee8a3ace58e0b1fd4d7b48badc169d1 100644 (file)
@@ -18,6 +18,9 @@ package org.mxchange.jjobs.beans.helper;
 
 import java.io.Serializable;
 import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jusercore.model.user.User;
 
 /**
@@ -28,18 +31,14 @@ import org.mxchange.jusercore.model.user.User;
 public interface JobsWebRequestController extends Serializable {
 
        /**
-        * Getter for user instance
-        * <p>
-        * @return User instance
+        * Copies currently set cell phone instance's data to admin phone controller
         */
-       User getUser ();
+       void copyCellphoneNumberToController ();
 
        /**
-        * Setter for user instance
-        * <p>
-        * @param user User instance
+        * Copies currently set contact instance's data to adminContactController
         */
-       void setUser (final User user);
+       void copyContactToController ();
 
        /**
         * Copies currently set user instance's data to adminUserController
@@ -71,8 +70,59 @@ public interface JobsWebRequestController extends Serializable {
        void setContact (final Contact contact);
 
        /**
-        * Copies currently set contact instance's data to adminContactController
+        * Getter for user instance
+        * <p>
+        * @return User instance
         */
-       void copyContactToController ();
+       User getUser ();
+
+       /**
+        * Setter for user instance
+        * <p>
+        * @param user User instance
+        */
+       void setUser (final User user);
+
+       /**
+        * Getter for dialable cellphone number instance
+        * <p>
+        * @return Dialable cellphone number instance
+        */
+       DialableCellphoneNumber getCellPhoneNumber ();
+
+       /**
+        * Setter for dialable cellphone number instance
+        * <p>
+        * @param cellPhone Dialable cellphone number instance
+        */
+       void setCellPhoneNumber (final DialableCellphoneNumber cellPhone);
+
+       /**
+        * Getter for dialable land-line number instance
+        * <p>
+        * @return Dialable land-line number instance
+        */
+       DialableLandLineNumber getLandLine ();
+
+       /**
+        * Setter for dialable land-line number instance
+        * <p>
+        * @param landLine Dialable land-line number instance
+        */
+       void setLandLine (final DialableLandLineNumber landLine);
+
+       /**
+        * Getter for dialable fax number instance
+        * <p>
+        * @return Dialable fax number instance
+        */
+       DialableFaxNumber getFax ();
+
+       /**
+        * Setter for dialable fax number instance
+        * <p>
+        * @param fax Dialable fax number instance
+        */
+       void setFax (final DialableFaxNumber fax);
 
 }
index 4d440cd6f27a0e4c2e0320370d0e29975b1287df..3b7567415093a7d051ed2605772675a72af43430 100644 (file)
@@ -22,12 +22,12 @@ import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jjobs.beans.contact.JobsAdminContactWebRequestController;
+import org.mxchange.jjobs.beans.phone.JobsAdminPhoneWebRequestController;
 import org.mxchange.jjobs.beans.user.JobsUserWebSessionController;
 import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jusercore.model.user.User;
-import org.mxchange.jjobs.beans.phone.JobsAdminPhoneWebRequestController;
 
 /**
  * A general helper for beans
@@ -55,11 +55,26 @@ public class JobsWebRequestHelper implements JobsWebRequestController {
        @Inject
        private JobsAdminPhoneWebRequestController adminPhoneController;
 
+       /**
+        * Cell phone number
+        */
+       private DialableCellphoneNumber cellPhoneNumber;
+
        /**
         * Contact instance
         */
        private Contact contact;
 
+       /**
+        * Fax number
+        */
+       private DialableFaxNumber fax;
+
+       /**
+        * Land-line number
+        */
+       private DialableLandLineNumber landLine;
+
        /**
         * User instance
         */
@@ -78,11 +93,42 @@ public class JobsWebRequestHelper implements JobsWebRequestController {
        }
 
        @Override
-       public void copyContactToController () {
-               // Log message
-               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyContactToController - CALLED!"); //NOI18N
+       public void copyCellphoneNumberToController () {
+               // Validate cellphone instance
+               if (this.getCellPhoneNumber() == null) {
+                       // Throw NPE
+                       throw new NullPointerException("this.cellPhoneNumber is null");
+               } else if (this.getCellPhoneNumber().getPhoneId() == null) {
+                       // Throw again
+                       throw new NullPointerException("this.cellPhoneNumber.phoneId is null");
+               } else if (this.getCellPhoneNumber().getPhoneId() < 1) {
+                       // Invalid id number
+                       throw new IllegalArgumentException(MessageFormat.format("this.cellPhoneNumber.phoneId={0} is not valid", this.getCellPhoneNumber().getPhoneId()));
+               } else if (this.getCellPhoneNumber().getCellphoneProvider() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("this.cellPhoneNumber.cellphoneProvider is null");
+               } else if (this.getCellPhoneNumber().getCellphoneProvider().getProviderId() == null) {
+                       // ... throw again
+                       throw new NullPointerException("this.cellPhoneNumber.cellphoneProvider.providerId is null");
+               } else if (this.getCellPhoneNumber().getCellphoneProvider().getProviderId() < 1) {
+                       // Invalid id
+                       throw new IllegalArgumentException(MessageFormat.format("this.cellPhoneNumber.cellphoneProvider.providerId={0} is invalid", this.getCellPhoneNumber().getCellphoneProvider().getProviderId()));
+               } else if (this.getCellPhoneNumber().getPhoneNumber() == null) {
+                       // Throw NPE again ...
+                       throw new NullPointerException("this.cellPhoneNumber.phoneNumber is null");
+               } else if (this.getCellPhoneNumber().getPhoneNumber() < 1) {
+                       // Invalid id number
+                       throw new IllegalArgumentException(MessageFormat.format("this.cellPhoneNumber.phoneNumber={0} is not valid", this.getCellPhoneNumber().getPhoneNumber()));
+               }
 
-               // Validate user instance
+               // Copy all (changeable) data fields to admin controller
+               this.adminPhoneController.setCellphoneProvider(this.getCellPhoneNumber().getCellphoneProvider());
+               this.adminPhoneController.setPhoneNumber(this.getCellPhoneNumber().getPhoneNumber());
+       }
+
+       @Override
+       public void copyContactToController () {
+               // Validate contact instance
                if (this.getContact() == null) {
                        // Throw NPE
                        throw new NullPointerException("this.contact is null"); //NOI18N
@@ -137,6 +183,16 @@ public class JobsWebRequestHelper implements JobsWebRequestController {
                //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyUserToController - EXIT!"); //NOI18N
        }
 
+       @Override
+       public DialableCellphoneNumber getCellPhoneNumber () {
+               return this.cellPhoneNumber;
+       }
+
+       @Override
+       public void setCellPhoneNumber (final DialableCellphoneNumber cellPhoneNumber) {
+               this.cellPhoneNumber = cellPhoneNumber;
+       }
+
        @Override
        public Contact getContact () {
                return this.contact;
@@ -177,6 +233,26 @@ public class JobsWebRequestHelper implements JobsWebRequestController {
                return messageKey;
        }
 
+       @Override
+       public DialableFaxNumber getFax () {
+               return this.fax;
+       }
+
+       @Override
+       public void setFax (final DialableFaxNumber fax) {
+               this.fax = fax;
+       }
+
+       @Override
+       public DialableLandLineNumber getLandLine () {
+               return this.landLine;
+       }
+
+       @Override
+       public void setLandLine (final DialableLandLineNumber landLine) {
+               this.landLine = landLine;
+       }
+
        @Override
        public User getUser () {
                return this.user;
@@ -208,19 +284,19 @@ public class JobsWebRequestHelper implements JobsWebRequestController {
                // Is cellphone set?
                if (contact.getContactCellphoneNumber() instanceof DialableCellphoneNumber) {
                        // Yes, then set it in admin controller
-                       this.adminPhoneController.setCellPhoneNumber(contact.getContactCellphoneNumber());
+                       this.setCellPhoneNumber(contact.getContactCellphoneNumber());
                }
 
                // Is land-line set?
                if (contact.getContactLandLineNumber() instanceof DialableLandLineNumber) {
                        // Yes, then set it in admin controller
-                       this.adminPhoneController.setLandLine(contact.getContactLandLineNumber());
+                       this.setLandLine(contact.getContactLandLineNumber());
                }
 
                // Is fax set?
                if (contact.getContactFaxNumber() instanceof DialableFaxNumber) {
                        // Yes, then set it in admin controller
-                       this.adminPhoneController.setFax(contact.getContactFaxNumber());
+                       this.setFax(contact.getContactFaxNumber());
                }
        }
 
index ee62859a5e37a09ddb250d4eb6ea9334b5f3c5db..861b3e12499c18deb6f6f275a20d64ddd6b1a644 100644 (file)
@@ -29,11 +29,10 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote;
 import org.mxchange.jjobs.beans.BaseJobsController;
+import org.mxchange.jjobs.beans.helper.JobsWebRequestController;
 import org.mxchange.jphone.events.updated.AdminCellphoneNumberUpdatedEvent;
 import org.mxchange.jphone.events.updated.AdminUpdatedCellphoneNumberEvent;
 import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
 
 /**
@@ -56,9 +55,10 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
        private AdminContactsPhoneSessionBeanRemote adminPhoneBean;
 
        /**
-        * Cell phone number
+        * Admin helper instance
         */
-       private DialableCellphoneNumber cellPhoneNumber;
+       @Inject
+       private JobsWebRequestController beanHelper;
 
        /**
         * Event being fired when an administrator has updated cell phone number
@@ -72,16 +72,6 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
         */
        private MobileProvider cellphoneProvider;
 
-       /**
-        * Fax number
-        */
-       private DialableFaxNumber fax;
-
-       /**
-        * Land-line number
-        */
-       private DialableLandLineNumber landLine;
-
        /**
         * Phone number
         */
@@ -107,30 +97,30 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
        @Override
        public String editCellphoneData () {
                // Is all data set
-               if (this.getCellPhoneNumber() == null) {
+               if (this.beanHelper.getCellPhoneNumber() == null) {
                        // Not set, throw NPE
                        throw new NullPointerException("this.cellphoneNumber is null"); //NOI18N
-               } else if (this.getCellPhoneNumber().getPhoneId() == null) {
+               } else if (this.beanHelper.getCellPhoneNumber().getPhoneId() == null) {
                        // Throw NPE again
                        throw new NullPointerException("this.cellphoneNumber.phoneId is null"); //NOI18N
-               } else if (this.getCellPhoneNumber().getPhoneId() < 1) {
+               } else if (this.beanHelper.getCellPhoneNumber().getPhoneId() < 1) {
                        // Invalid number
-                       throw new IllegalArgumentException(MessageFormat.format("this.cellphoneNumber.phoneId={0} is not valid", this.getCellPhoneNumber().getPhoneId())); //NOI18N
-               } else if (this.getCellPhoneNumber().getCellphoneProvider() == null) {
+                       throw new IllegalArgumentException(MessageFormat.format("this.cellphoneNumber.phoneId={0} is not valid", this.beanHelper.getCellPhoneNumber().getPhoneId())); //NOI18N
+               } else if (this.beanHelper.getCellPhoneNumber().getCellphoneProvider() == null) {
                        // Throw NPE
                        throw new NullPointerException("this.cellphoneNumber.cellphoneProvider is null"); //NOI18N
-               } else if (this.getCellPhoneNumber().getCellphoneProvider().getProviderId() == null) {
+               } else if (this.beanHelper.getCellPhoneNumber().getCellphoneProvider().getProviderId() == null) {
                        // ... throw again
                        throw new NullPointerException("this.cellphoneNumber.cellphoneProvider.providerId is null"); //NOI18N
-               } else if (this.getCellPhoneNumber().getCellphoneProvider().getProviderId() < 1) {
+               } else if (this.beanHelper.getCellPhoneNumber().getCellphoneProvider().getProviderId() < 1) {
                        // Id not valid
-                       throw new IllegalArgumentException(MessageFormat.format("this.cellphoneNumber.cellphoneProvider.providerId={0} is not valid.", this.getCellPhoneNumber().getCellphoneProvider().getProviderId())); //NOI18N
-               } else if (this.getCellPhoneNumber().getPhoneNumber() == null) {
+                       throw new IllegalArgumentException(MessageFormat.format("this.cellphoneNumber.cellphoneProvider.providerId={0} is not valid.", this.beanHelper.getCellPhoneNumber().getCellphoneProvider().getProviderId())); //NOI18N
+               } else if (this.beanHelper.getCellPhoneNumber().getPhoneNumber() == null) {
                        // Throw NPE again
                        throw new NullPointerException("this.cellphoneNumber.phoneNumber is null"); //NOI18N
-               } else if (this.getCellPhoneNumber().getPhoneNumber() < 1) {
+               } else if (this.beanHelper.getCellPhoneNumber().getPhoneNumber() < 1) {
                        // Throw NPE again
-                       throw new NullPointerException(MessageFormat.format("this.cellphoneNumber.phoneNumber={0} is not valid.", this.getCellPhoneNumber().getPhoneNumber())); //NOI18N
+                       throw new NullPointerException(MessageFormat.format("this.cellphoneNumber.phoneNumber={0} is not valid.", this.beanHelper.getCellPhoneNumber().getPhoneNumber())); //NOI18N
                } else if (this.getCellphoneProvider() == null) {
                        // Not provided
                        this.showFacesMessage("form_edit_cellphone:cellphoneProvider", "No mobile provider selected"); //NOI18N
@@ -148,17 +138,17 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
                }
 
                // Is the mobile provider and number the same?
-               if ((Objects.equals(this.getCellphoneProvider(), this.getCellPhoneNumber().getCellphoneProvider())) && (Objects.equals(this.getPhoneNumber(), this.getCellPhoneNumber().getPhoneNumber()))) {
+               if ((Objects.equals(this.getCellphoneProvider(), this.beanHelper.getCellPhoneNumber().getCellphoneProvider())) && (Objects.equals(this.getPhoneNumber(), this.beanHelper.getCellPhoneNumber().getPhoneNumber()))) {
                        // No difference in both together, no need to edit
                        return ""; //NOI18N
                }
 
                // Set all data
-               this.getCellPhoneNumber().setCellphoneProvider(this.getCellphoneProvider());
-               this.getCellPhoneNumber().setPhoneNumber(this.getPhoneNumber());
+               this.beanHelper.getCellPhoneNumber().setCellphoneProvider(this.getCellphoneProvider());
+               this.beanHelper.getCellPhoneNumber().setPhoneNumber(this.getPhoneNumber());
 
                // Send to bean
-               DialableCellphoneNumber updatedNumber = this.adminPhoneBean.updateCellphoneData(this.getCellPhoneNumber());
+               DialableCellphoneNumber updatedNumber = this.adminPhoneBean.updateCellphoneData(this.beanHelper.getCellPhoneNumber());
 
                // Fire event
                this.cellPhoneNumberUpdatedEvent.fire(new AdminCellphoneNumberUpdatedEvent(updatedNumber));
@@ -167,16 +157,6 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
                return "admin_edit_cellphone?faces-redirect=true&includeViewParams=true"; //NOI18N
        }
 
-       @Override
-       public DialableCellphoneNumber getCellPhoneNumber () {
-               return this.cellPhoneNumber;
-       }
-
-       @Override
-       public void setCellPhoneNumber (final DialableCellphoneNumber cellPhoneNumber) {
-               this.cellPhoneNumber = cellPhoneNumber;
-       }
-
        @Override
        public MobileProvider getCellphoneProvider () {
                return this.cellphoneProvider;
@@ -187,26 +167,6 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
                this.cellphoneProvider = cellphoneProvider;
        }
 
-       @Override
-       public DialableFaxNumber getFax () {
-               return this.fax;
-       }
-
-       @Override
-       public void setFax (final DialableFaxNumber fax) {
-               this.fax = fax;
-       }
-
-       @Override
-       public DialableLandLineNumber getLandLine () {
-               return this.landLine;
-       }
-
-       @Override
-       public void setLandLine (final DialableLandLineNumber landLine) {
-               this.landLine = landLine;
-       }
-
        @Override
        public Long getPhoneNumber () {
                return this.phoneNumber;
index b2e1d8ce51456f6628b9b3f2637f265c34ef1bbe..c74a459322d328ff1c508ed755ed26dd90609793 100644 (file)
@@ -18,9 +18,6 @@ package org.mxchange.jjobs.beans.phone;
 
 import java.io.Serializable;
 import javax.ejb.Local;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
 
 /**
@@ -39,48 +36,6 @@ public interface JobsAdminPhoneWebRequestController extends Serializable {
         */
        String editCellphoneData ();
 
-       /**
-        * Getter for dialable cellphone number instance
-        * <p>
-        * @return Dialable cellphone number instance
-        */
-       DialableCellphoneNumber getCellPhoneNumber ();
-
-       /**
-        * Setter for dialable cellphone number instance
-        * <p>
-        * @param cellPhone Dialable cellphone number instance
-        */
-       void setCellPhoneNumber (final DialableCellphoneNumber cellPhone);
-
-       /**
-        * Setter for dialable land-line number instance
-        * <p>
-        * @param landLine Dialable land-line number instance
-        */
-       void setLandLine (final DialableLandLineNumber landLine);
-
-       /**
-        * Getter for dialable land-line number instance
-        * <p>
-        * @return Dialable land-line number instance
-        */
-       DialableLandLineNumber getLandLine ();
-
-       /**
-        * Setter for dialable fax number instance
-        * <p>
-        * @param fax Dialable fax number instance
-        */
-       void setFax (final DialableFaxNumber fax);
-
-       /**
-        * Getter for dialable fax number instance
-        * <p>
-        * @return Dialable fax number instance
-        */
-       DialableFaxNumber getFax ();
-
        /**
         * Getter for cell phone provider
         * <p>
index decbd6148b40792d1e1f78aa3460a663e3849727..dd960dd5e4ffc968aff87598b0fa785c43cae08e 100644 (file)
@@ -5,9 +5,9 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
-       <h:outputText styleClass="errors" value="#{msg.ERROR_ADMIN_BEAN_CELLPHONE_NUMBER_NOT_SET}" rendered="#{empty adminPhoneController.cellPhoneNumber}" />
+       <h:outputText styleClass="errors" value="#{msg.ERROR_ADMIN_BEAN_CELLPHONE_NUMBER_NOT_SET}" rendered="#{empty beanHelper.cellPhoneNumber}" />
 
-       <h:panelGrid id="cellphone_data" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_CELLPHONE_DATA}" headerClass="table_header_column" styleClass="table_big" columns="2" rendered="#{not empty adminPhoneController.cellPhoneNumber}">
+       <h:panelGrid id="cellphone_data" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_CELLPHONE_DATA}" headerClass="table_header_column" styleClass="table_big" columns="2" rendered="#{not empty beanHelper.cellPhoneNumber}">
                <f:facet name="header">
                        <h:outputText value="#{msg.ADMIN_HEADER_SHOW_CELLPHONE_DATA}" />
                </f:facet>
                <h:column>
                        <h:outputLabel for="cellphoneId" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_ID}" />
 
-                       <h:outputText id="cellphoneId" styleClass="data_field" value="#{adminPhoneController.cellPhoneNumber.phoneId}" />
+                       <h:outputText id="cellphoneId" styleClass="data_field" value="#{beanHelper.cellPhoneNumber.phoneId}" />
                </h:column>
 
                <h:column>
                        <h:outputLabel for="cellphoneProvider" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_PROVIDER_NAME}" />
 
                        <h:link outcome="admin_show_mobile_provider">
-                               <f:param name="providerId" value="#{adminPhoneController.cellPhoneNumber.cellphoneProvider.providerId}" />
-                               <h:outputText id="cellphoneProvider" styleClass="data_field" value="#{adminPhoneController.cellPhoneNumber.cellphoneProvider.providerName}" />
+                               <f:param name="providerId" value="#{beanHelper.cellPhoneNumber.cellphoneProvider.providerId}" />
+                               <h:outputText id="cellphoneProvider" styleClass="data_field" value="#{beanHelper.cellPhoneNumber.cellphoneProvider.providerName}" />
                        </h:link>
                </h:column>
 
                <h:column>
                        <h:outputLabel for="cellphoneNumber" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_NUMBER_COMPLETE}" />
 
-                       <h:outputText id="cellphoneNumber" styleClass="data_field" value="#{adminPhoneController.cellPhoneNumber.cellphoneProvider.providerCountry.countryExternalDialPrefix}#{adminPhoneController.cellPhoneNumber.cellphoneProvider.providerDialPrefix}-#{adminPhoneController.cellPhoneNumber.phoneNumber}" />
+                       <h:outputText id="cellphoneNumber" styleClass="data_field" value="#{beanHelper.cellPhoneNumber.cellphoneProvider.providerCountry.countryExternalDialPrefix}#{beanHelper.cellPhoneNumber.cellphoneProvider.providerDialPrefix}-#{beanHelper.cellPhoneNumber.phoneNumber}" />
                </h:column>
 
                <h:column>
index c37d53f9d14ab0faa43206bc06ce619d192c4a84..071b7fe6488e7132103b0ff20775062621e13557 100644 (file)
@@ -5,15 +5,15 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
-       <h:outputText styleClass="errors" value="#{msg.ERROR_ADMIN_BEAN_CELLPHONE_NUMBER_NOT_SET}" rendered="#{empty adminPhoneController.cellPhoneNumber}" />
+       <h:outputText styleClass="errors" value="#{msg.ERROR_ADMIN_BEAN_CELLPHONE_NUMBER_NOT_SET}" rendered="#{empty beanHelper.cellPhoneNumber}" />
 
-       <ui:fragment rendered="#{not empty adminPhoneController.cellPhoneNumber}">
+       <ui:fragment rendered="#{not empty beanHelper.cellPhoneNumber}">
                <ul class="mini_nav">
                        <ui:fragment rendered="#{empty isShowPage or not isShowPage}">
                                <li class="mini_link">
                                        <h:link outcome="admin_show_cellphone">
                                                <h:outputText value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_SHORT_TITLE}" />
-                                               <f:param name="phoneId" value="#{adminPhoneController.cellPhoneNumber.phoneId}" />
+                                               <f:param name="phoneId" value="#{beanHelper.cellPhoneNumber.phoneId}" />
                                        </h:link>
                                </li>
                        </ui:fragment>
@@ -21,7 +21,7 @@
                        <li class="mini_link">
                                <h:link outcome="admin_edit_cellphone">
                                        <h:outputText value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{msg.ADMIN_LINK_EDIT_SHORT_TITLE}" />
-                                       <f:param name="phoneId" value="#{adminPhoneController.cellPhoneNumber.phoneId}" />
+                                       <f:param name="phoneId" value="#{beanHelper.cellPhoneNumber.phoneId}" />
                                </h:link>
                        </li>
 
@@ -29,7 +29,7 @@
                                <li class="mini_link">
                                        <h:link outcome="admin_unlink_contact_cellphone">
                                                <h:outputText styleClass="unlink_link" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_SHORT_TITLE}" />
-                                               <f:param name="phoneId" value="#{adminPhoneController.cellPhoneNumber.phoneId}" />
+                                               <f:param name="phoneId" value="#{beanHelper.cellPhoneNumber.phoneId}" />
                                                <f:param name="contactId" value="#{beanHelper.contact.contactId}" />
                                        </h:link>
                                </li>
@@ -38,7 +38,7 @@
                        <li class="mini_link">
                                <h:link outcome="admin_delete_cellphone">
                                        <h:outputText styleClass="delete_link" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{msg.ADMIN_LINK_DELETE_SHORT_TITLE}" />
-                                       <f:param name="phoneId" value="#{adminPhoneController.cellPhoneNumber.phoneId}" />
+                                       <f:param name="phoneId" value="#{beanHelper.cellPhoneNumber.phoneId}" />
                                </h:link>
                        </li>
                </ul>
index 88b55dbc2076b806919f4ce495d874f390c246cb..1acba6752d35593ab48c65095814a0d5e8ebb306 100644 (file)
@@ -5,7 +5,7 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
-       <h:outputText styleClass="errors" value="#{msg.ERROR_ADMIN_BEAN_CELLPHONE_NUMBER_NOT_SET}" rendered="#{empty adminPhoneController.cellPhoneNumber}" />
+       <h:outputText styleClass="errors" value="#{msg.ERROR_ADMIN_BEAN_CELLPHONE_NUMBER_NOT_SET}" rendered="#{empty beanHelper.cellPhoneNumber}" />
 
        <div class="para">
                <fieldset id="phone_data">
@@ -19,7 +19,7 @@
                                </div>
 
                                <div class="table_right_medium">
-                                       <h:outputText id="cellphoneId" value="#{adminPhoneController.cellPhoneNumber.phoneId}" />
+                                       <h:outputText id="cellphoneId" value="#{beanHelper.cellPhoneNumber.phoneId}" />
                                </div>
 
                                <div class="clear"></div>
index 829047dbac4359d13404ef91a7a88c48a18fa178..13f28dc0233795a3cebe22d679af80e8279aaded 100644 (file)
@@ -8,7 +8,7 @@
        >
 
        <f:metadata>
-               <f:viewParam name="phoneId" value="#{adminPhoneController.cellPhoneNumber}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+               <f:viewParam name="phoneId" value="#{beanHelper.cellPhoneNumber}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
        </f:metadata>
 
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
index 159db8dc4981039876a752a6a44bf9fed935b9be..2c87088a156d216059117432bd2681c68a77cc40 100644 (file)
@@ -8,7 +8,8 @@
        >
 
        <f:metadata>
-               <f:viewParam name="phoneId" value="#{adminPhoneController.cellPhoneNumber}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+               <f:viewParam name="phoneId" value="#{beanHelper.cellPhoneNumber}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+               <f:viewAction action="#{beanHelper.copyCellphoneNumberToController()}" />
        </f:metadata>
 
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
@@ -19,7 +20,7 @@
                </ui:define>
 
                <ui:define name="content">
-                       <h:form id="form_edit_cellphone" rendered="#{not empty adminPhoneController.cellPhoneNumber}">
+                       <h:form id="form_edit_cellphone" rendered="#{not empty beanHelper.cellPhoneNumber}">
                                <div class="table_medium">
                                        <div class="table_header">
                                                #{msg.ADMIN_EDIT_CELLPHONE_TITLE}
@@ -34,7 +35,7 @@
                                </div>
                        </h:form>
 
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_ADMIN_BEAN_CELLPHONE_NUMBER_NOT_SET}" rendered="#{empty adminPhoneController.cellPhoneNumber}" />
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_ADMIN_BEAN_CELLPHONE_NUMBER_NOT_SET}" rendered="#{empty beanHelper.cellPhoneNumber}" />
                </ui:define>
        </ui:composition>
 </html>
index 0dac78b46d190164588515333f2a6d641588f6d8..8a107ada13fb6faa85019d9a3da9970b43951b10 100644 (file)
@@ -8,7 +8,7 @@
        >
 
        <f:metadata>
-               <f:viewParam name="phoneId" value="#{adminPhoneController.cellPhoneNumber}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+               <f:viewParam name="phoneId" value="#{beanHelper.cellPhoneNumber}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
        </f:metadata>
 
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
@@ -26,7 +26,7 @@
                        <h:dataTable id="contact_cellphone_link" var="contact" value="#{contactPhoneController.allCellphoneContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_CELLPHONE_LINKS}" headerClass="table_header_column" styleClass="table_medium">
                                <f:facet name="header">
                                        <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_CELLPHONE_LINKS}">
-                                               <f:param value="#{adminPhoneController.cellPhoneNumber.phoneId}" />
+                                               <f:param value="#{beanHelper.cellPhoneNumber.phoneId}" />
                                        </h:outputFormat>
                                </f:facet>
 
@@ -79,7 +79,7 @@
                                                        <li class="mini_link">
                                                                <h:link outcome="admin_unlink_contact_cellphone">
                                                                        <h:outputText styleClass="unlink_link" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_SHORT_TITLE}" />
-                                                                       <f:param name="phoneId" value="#{adminPhoneController.cellPhoneNumber.phoneId}" />
+                                                                       <f:param name="phoneId" value="#{beanHelper.cellPhoneNumber.phoneId}" />
                                                                        <f:param name="contactId" value="#{contact.contactId}" />
                                                                </h:link>
                                                        </li>
index 0fa8d3c4fb50b944df02724b5419ad9ed192a675..1eb5525bba0bd003ecb9f9d7552c9a0ed7506fd4 100644 (file)
@@ -8,7 +8,7 @@
        >
 
        <f:metadata>
-               <f:viewParam name="phoneId" value="#{adminPhoneController.cellPhoneNumber}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+               <f:viewParam name="phoneId" value="#{beanHelper.cellPhoneNumber}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
                <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
        </f:metadata>