]> git.mxchange.org Git - jjobs-war.git/commitdiff
Continued with rewrite: (please cherry-pick)
authorRoland Häder <roland@mxchange.org>
Mon, 8 Aug 2016 14:51:58 +0000 (16:51 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 8 Aug 2016 18:49:29 +0000 (20:49 +0200)
- renamed some admin_contact_cellphone_???.xhtml to admin_cellphone_???.xhtml as they are generic enough (not depending on contact)
- moved phone-contact stuff to adminContactController
- renamed i18n strings properly
- no need to have contact in adminPhoneController, better is the obvious one: beanHelper
- started with listing all cell phone numbers (similar JSF will follow for land-line and fax numbers)
- the contact stuff in adminPhoneHelper was deprecated anyway

Signed-off-by: Roland Häder <roland@haeder.net>
Signed-off-by: Roland Häder <roland@mxchange.org>
16 files changed:
nbproject/faces-config.NavData
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionController.java
src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java
src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestController.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/faces-config.xml
web/admin/cellphone/admin_cellphone_delete.xhtml [new file with mode: 0644]
web/admin/cellphone/admin_cellphone_edit.xhtml [new file with mode: 0644]
web/admin/cellphone/admin_cellphone_show.xhtml [new file with mode: 0644]
web/admin/cellphone/admin_contact_cellphone_delete.xhtml [deleted file]
web/admin/cellphone/admin_contact_cellphone_edit.xhtml [deleted file]
web/admin/cellphone/admin_contact_cellphone_list.xhtml
web/admin/cellphone/admin_contact_cellphone_show.xhtml [deleted file]
web/admin/cellphone/admin_contact_cellphone_unlink.xhtml

index 29c8a39e11a1b3523c8ee158478f3a021d46126a..afcb65584e7c76d113d7223cb7682519370522d2 100644 (file)
@@ -2,71 +2,74 @@
 <Scene Scope="Project" version="2">
     <Scope Scope="Faces Configuration Only"/>
     <Scope Scope="Project">
-        <Node id="user/login_logout.xhtml" x="400" y="750" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="1650" y="600" zoom="true"/>
-        <Node id="admin/contact/admin_contact_show.xhtml" x="1150" y="750" zoom="true"/>
-        <Node id="privacy.xhtml" x="650" y="600" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="400" y="450" zoom="true"/>
-        <Node id="guest/user/show_addressbook.xhtml" x="900" y="300" zoom="true"/>
-        <Node id="admin/user/admin_user_show.xhtml" x="900" y="150" zoom="true"/>
-        <Node id="admin/index.xhtml" x="2400" y="150" zoom="true"/>
-        <Node id="user/login_own_addressbooks.xhtml" x="1150" y="450" zoom="true"/>
-        <Node id="user/login_user_data_saved.xhtml" x="1650" y="150" zoom="true"/>
-        <Node id="admin/admin_logout.xhtml" x="1400" y="300" zoom="true"/>
-        <Node id="user/login_data_saved.xhtml" x="150" y="750" zoom="true"/>
-        <Node id="admin/user/admin_user_unlock.xhtml" x="2650" y="150" zoom="true"/>
-        <Node id="guest/user/user_list.xhtml" x="900" y="750" zoom="true"/>
-        <Node id="index.xhtml" x="1150" y="900" zoom="true"/>
-        <Node id="user/login_edit_user_data.xhtml" x="650" y="1050" zoom="true"/>
-        <Node id="admin/admin_category_delete.xhtml" x="150" y="1350" zoom="true"/>
-        <Node id="*" x="2150" y="300" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="1400" y="450" zoom="true"/>
-        <Node id="user/login_index.xhtml" x="1900" y="600" zoom="true"/>
-        <Node id="guest/user/lost_passwd.xhtml" x="150" y="600" zoom="true"/>
-        <Node id="guest/user/register_done.xhtml" x="1900" y="150" zoom="true"/>
-        <Node id="guest/user/show_addressbook_entries.xhtml" x="2150" y="450" zoom="true"/>
-        <Node id="user/login.xhtml" x="1900" y="450" zoom="true"/>
-        <Node id="login/login_edit_user_data.xhtml" x="1150" y="600" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="1650" y="450" zoom="true"/>
-        <Node id="admin/country/admin_country_list.xhtml" x="900" y="900" zoom="true"/>
-        <Node id="guest/user/login_error.xhtml" x="150" y="900" zoom="true"/>
-        <Node id="admin/user/admin_user_export.xhtml" x="650" y="450" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="400" y="150" zoom="true"/>
-        <Node id="guest/user/resend_done.xhtml" x="2400" y="300" zoom="true"/>
-        <Node id="user/login_change_password.xhtml" x="150" y="1050" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="650" y="900" zoom="true"/>
-        <Node id="admin/contact/admin_contact_export.xhtml" x="400" y="1500" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="1150" y="150" zoom="true"/>
+        <Node id="user/login_logout.xhtml" x="2900" y="150" zoom="true"/>
+        <Node id="admin/cellphone/admin_cellphone_delete.xhtml" x="1400" y="300" zoom="true"/>
+        <Node id="admin/contact/admin_contact_show.xhtml" x="1150" y="900" zoom="true"/>
+        <Node id="privacy.xhtml" x="1900" y="300" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="1400" y="150" zoom="true"/>
+        <Node id="guest/user/show_addressbook.xhtml" x="400" y="900" zoom="true"/>
+        <Node id="admin/user/admin_user_show.xhtml" x="2400" y="150" zoom="true"/>
+        <Node id="admin/index.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="user/login_own_addressbooks.xhtml" x="650" y="1200" zoom="true"/>
+        <Node id="user/login_user_data_saved.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="admin/cellphone/admin_cellphone_show.xhtml" x="900" y="1200" zoom="true"/>
+        <Node id="admin/admin_logout.xhtml" x="400" y="150" zoom="true"/>
+        <Node id="user/login_data_saved.xhtml" x="2150" y="150" zoom="true"/>
+        <Node id="admin/user/admin_user_unlock.xhtml" x="900" y="750" zoom="true"/>
+        <Node id="admin/cellphone/admin_cellphone_edit.xhtml" x="400" y="1050" zoom="true"/>
+        <Node id="guest/user/user_list.xhtml" x="150" y="300" zoom="true"/>
+        <Node id="index.xhtml" x="150" y="1650" zoom="true"/>
+        <Node id="user/login_edit_user_data.xhtml" x="150" y="900" zoom="true"/>
+        <Node id="*" x="150" y="1200" zoom="true"/>
+        <Node id="admin/admin_category_delete.xhtml" x="900" y="900" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="user/login_index.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="guest/user/lost_passwd.xhtml" x="900" y="1050" zoom="true"/>
+        <Node id="guest/user/register_done.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="guest/user/show_addressbook_entries.xhtml" x="650" y="1050" zoom="true"/>
+        <Node id="user/login.xhtml" x="900" y="300" zoom="true"/>
+        <Node id="admin/country/admin_country_list.xhtml" x="650" y="450" zoom="true"/>
+        <Node id="login/login_edit_user_data.xhtml" x="650" y="900" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="1400" y="900" zoom="true"/>
+        <Node id="guest/user/login_error.xhtml" x="1400" y="750" zoom="true"/>
+        <Node id="admin/user/admin_user_export.xhtml" x="150" y="450" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="150" y="150" zoom="true"/>
+        <Node id="guest/user/resend_done.xhtml" x="1900" y="450" zoom="true"/>
+        <Node id="user/login_change_password.xhtml" x="150" y="1350" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="2650" y="150" zoom="true"/>
+        <Node id="admin/contact/admin_contact_export.xhtml" x="1150" y="1050" zoom="true"/>
         <Node id="guest/user/user_profile.xhtml" x="400" y="300" zoom="true"/>
-        <Node id="guest/user/confirm_account.xhtml" x="650" y="750" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="150" y="150" zoom="true"/>
-        <Node id="admin/user/admin_user_delete.xhtml" x="900" y="600" zoom="true"/>
-        <Node id="exception.xhtml" x="650" y="1350" zoom="true"/>
-        <Node id="login/login_index.xhtml" x="150" y="450" zoom="true"/>
-        <Node id="admin/user/admin_user_edit.xhtml" x="1650" y="300" zoom="true"/>
-        <Node id="guest/user/register_page2.xhtml" x="1900" y="300" zoom="true"/>
-        <Node id="terms.xhtml" x="1400" y="150" zoom="true"/>
-        <Node id="admin/contact/admin_contact_edit.xhtml" x="400" y="600" zoom="true"/>
-        <Node id="admin/contact/admin_contact_list.xhtml" x="1400" y="900" zoom="true"/>
-        <Node id="admin/user/admin_user_lock.xhtml" x="1150" y="150" zoom="true"/>
-        <Node id="admin/user/admin_user_list.xhtml" x="150" y="300" zoom="true"/>
-        <Node id="admin/admin_user_add.xhtml" x="1400" y="750" zoom="true"/>
-        <Node id="admin/country/admin_country_delete.xhtml" x="150" y="1500" zoom="true"/>
-        <Node id="user/login_change_personal_data.xhtml" x="2150" y="150" zoom="true"/>
-        <Node id="admin/country/admin_country_edit.xhtml" x="900" y="1050" zoom="true"/>
-        <Node id="logout.xhtml" x="400" y="1350" zoom="true"/>
-        <Node id="guest/user/resend_link.xhtml" x="650" y="300" zoom="true"/>
-        <Node id="user/login_add_addressbook.xhtml" x="400" y="900" zoom="true"/>
-        <Node id="user/login_contact_data_saved.xhtml" x="1150" y="1050" zoom="true"/>
-        <Node id="user/user_profile.xhtml" x="1400" y="600" zoom="true"/>
-        <Node id="admin/contact/admin_contact_delete.xhtml" x="1650" y="750" zoom="true"/>
-        <Node id="imprint.xhtml" x="400" y="1050" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="900" y="1200" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="150" y="1200" zoom="true"/>
-        <Node id="guest/user/login.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="guest/user/confirm_account.xhtml" x="1900" y="150" zoom="true"/>
+        <Node id="admin/user/admin_user_delete.xhtml" x="1150" y="600" zoom="true"/>
+        <Node id="exception.xhtml" x="1900" y="600" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="400" y="1500" zoom="true"/>
+        <Node id="login/login_index.xhtml" x="150" y="1500" zoom="true"/>
+        <Node id="admin/user/admin_user_edit.xhtml" x="650" y="600" zoom="true"/>
+        <Node id="guest/user/register_page2.xhtml" x="1650" y="600" zoom="true"/>
+        <Node id="terms.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="admin/contact/admin_contact_list.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="admin/contact/admin_contact_edit.xhtml" x="2650" y="300" zoom="true"/>
+        <Node id="admin/user/admin_user_lock.xhtml" x="650" y="150" zoom="true"/>
+        <Node id="admin/admin_user_add.xhtml" x="1650" y="150" zoom="true"/>
+        <Node id="admin/user/admin_user_list.xhtml" x="1650" y="750" zoom="true"/>
+        <Node id="admin/country/admin_country_delete.xhtml" x="1400" y="450" zoom="true"/>
+        <Node id="user/login_change_personal_data.xhtml" x="650" y="1350" zoom="true"/>
+        <Node id="admin/country/admin_country_edit.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="logout.xhtml" x="1650" y="300" zoom="true"/>
+        <Node id="user/login_add_addressbook.xhtml" x="900" y="150" zoom="true"/>
+        <Node id="guest/user/resend_link.xhtml" x="2150" y="300" zoom="true"/>
+        <Node id="user/login_contact_data_saved.xhtml" x="1150" y="750" zoom="true"/>
+        <Node id="user/user_profile.xhtml" x="150" y="1050" zoom="true"/>
+        <Node id="admin/contact/admin_contact_delete.xhtml" x="400" y="1350" zoom="true"/>
+        <Node id="imprint.xhtml" x="2400" y="300" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="1650" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="1400" y="600" zoom="true"/>
+        <Node id="guest/user/login.xhtml" x="400" y="600" zoom="true"/>
         <Node id="admin/admin_product_delete.xhtml" x="400" y="1200" zoom="true"/>
-        <Node id="guest/user/register.xhtml" x="650" y="1200" zoom="true"/>
-        <Node id="user/login_change_email_address.xhtml" x="650" y="150" zoom="true"/>
-        <Node id="user/login/login_data_saved.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="guest/user/register.xhtml" x="900" y="600" zoom="true"/>
+        <Node id="user/login_change_email_address.xhtml" x="150" y="750" zoom="true"/>
+        <Node id="user/login/login_data_saved.xhtml" x="2150" y="450" zoom="true"/>
     </Scope>
     <Scope Scope="All Faces Configurations"/>
 </Scene>
index f2ea5365007d1fcac6a424eff56fa46312f1a0e1..80ee15f5d01f9056484a5a3eda1207e56b3f5928 100644 (file)
@@ -19,8 +19,11 @@ package org.mxchange.jjobs.beans.contact;
 import java.text.MessageFormat;
 import java.util.Collections;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
+import java.util.Map;
 import java.util.Objects;
 import javax.annotation.PostConstruct;
 import javax.enterprise.context.SessionScoped;
@@ -42,6 +45,7 @@ import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
 import org.mxchange.jcountry.data.Country;
 import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.login.JobsUserLoginWebSessionController;
+import org.mxchange.jjobs.beans.phone.JobsAdminPhoneWebRequestController;
 import org.mxchange.jjobs.beans.user.JobsUserWebSessionController;
 import org.mxchange.jphone.phonenumbers.cellphone.CellphoneNumber;
 import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
@@ -50,6 +54,7 @@ import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
+import org.mxchange.jphone.phonenumbers.phone.AdminPhoneSessionBeanRemote;
 import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent;
 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
@@ -72,6 +77,17 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
         */
        private static final long serialVersionUID = 542_145_347_916L;
 
+       /**
+        * Remote EJB for phone number (administrative)
+        */
+       private AdminPhoneSessionBeanRemote adminPhoneBean;
+
+       /**
+        * Administrative phone controller
+        */
+       @Inject
+       private JobsAdminPhoneWebRequestController adminPhoneController;
+
        /**
         * Birth day
         */
@@ -87,6 +103,11 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
         */
        private Long cellphoneNumber;
 
+       /**
+        * All cell phone numbers
+        */
+       private final List<DialableCellphoneNumber> cellphoneNumbers;
+
        /**
         * City
         */
@@ -105,7 +126,13 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
        /**
         * Contact list
         */
-       private List<Contact> contactList;
+       private final List<Contact> contactList;
+
+       /**
+        * "Cache" for contact lists, mostly only one is assigned. So this cache
+        * shouldn't grow beyond control.
+        */
+       private final Map<Long, List<Contact>> contacts;
 
        /**
         * Country instance
@@ -120,7 +147,7 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
        /**
         * Email address list
         */
-       private List<String> emailAddressList;
+       private final List<String> emailAddressList;
 
        /**
         * Email address repeated
@@ -240,17 +267,23 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
 
                        // Try to lookup
                        this.contactBean = (ContactSessionBeanRemote) context.lookup("java:global/jratecalc-ejb/contact!org.mxchange.jcontacts.contact.ContactSessionBeanRemote"); //NOI18N
+
+                       // Try to lookup the beans
+                       this.adminPhoneBean = (AdminPhoneSessionBeanRemote) context.lookup("java:global/jjobs-ejb/adminphone!org.mxchange.jphone.phonenumbers.phone.AdminPhoneSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);
                }
+
+               // Init lists/maps
+               this.cellphoneNumbers = new LinkedList<>();
+               this.contacts = new HashMap<>(10);
+               this.contactList = new LinkedList<>();
+               this.emailAddressList = new LinkedList<>();
        }
 
        @Override
        public void afterAdminAddedContact (@Observes final AdminAddedContactEvent event) {
-               // Trace message
-               /* NOISY-DEBUG: */ System.out.println(MessageFormat.format("contactController.afterAdminAddedContact(): event={0} - CALLED!", event)); //NOI18N
-
                // The event must be valid
                if (null == event) {
                        // Throw NPE
@@ -423,6 +456,36 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                this.copyContact(event.getLoggedInUser().getUserContact());
        }
 
+       @Override
+       public List<Contact> allCellphoneContacts () {
+               // Get id
+               Long phoneId = this.adminPhoneController.getCellPhone().getPhoneId();
+
+               // Is cache there?
+               if (this.contacts.containsKey(phoneId)) {
+                       // Return cached version
+                       return this.contacts.get(phoneId);
+               } else {
+                       // Ask bean
+                       List<Contact> list = new LinkedList<>();
+
+                       // "Walk" through all contacts
+                       for (final Contact contact : this.contactList) {
+                               // Is cellphone instance the same?
+                               if (Objects.equals(contact.getContactCellphoneNumber(), this.adminPhoneController.getCellPhone())) {
+                                       // Found one
+                                       list.add(contact);
+                               }
+                       }
+
+                       // Store result in cache
+                       this.contacts.put(phoneId, list);
+
+                       // Return now-cached list
+                       return list;
+               }
+       }
+
        @Override
        public List<Contact> allContacts () {
                // Debug message
@@ -821,10 +884,10 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
        @PostConstruct
        public void init () {
                // Get full email address list for reducing EJB calls
-               this.emailAddressList = this.contactBean.getEmailAddressList();
+               this.emailAddressList.addAll(this.contactBean.getEmailAddressList());
 
                // Get full contact list
-               this.contactList = this.contactBean.getAllContacts();
+               this.contactList.addAll(this.contactBean.getAllContacts());
 
                // Get all users
                List<User> allUsers = this.userController.allUsers();
@@ -859,6 +922,9 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
 
                // Set contact list
                this.selectableContacts = allContacts;
+
+               // All phone numbers
+               this.cellphoneNumbers.addAll(this.adminPhoneBean.allCellphoneNumbers());
        }
 
        @Override
index 41f140605bd111bb44285eefc9a3b44419e3d5a6..8dd604f90a6db4e4092ceda5467911fdf386ba00 100644 (file)
@@ -19,6 +19,7 @@ package org.mxchange.jjobs.beans.contact;
 import java.io.Serializable;
 import java.util.Date;
 import java.util.List;
+import javax.ejb.Local;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.contact.gender.Gender;
 import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
@@ -37,6 +38,7 @@ import org.mxchange.jusercore.events.user.linked.AdminLinkedUserEvent;
  * <p>
  * @author Roland Haeder<roland@mxchange.org>
  */
+@Local
 public interface JobsContactWebSessionController extends Serializable {
 
        /**
@@ -51,6 +53,13 @@ public interface JobsContactWebSessionController extends Serializable {
         */
        List<Contact> allContacts ();
 
+       /**
+        * Getter for all contacts having current cellphone instance linked
+        * <p>
+        * @return List of all linked contacts
+        */
+       List<Contact> allCellphoneContacts ();
+
        /**
         * Checks whether there are contacts.
         * <p>
index 05787bbee10de431286ddf1739889eb3ee731f03..801352f401e2ba09959cb060f5d3317ef86bb137 100644 (file)
  */
 package org.mxchange.jjobs.beans.phone;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
 import javax.enterprise.context.RequestScoped;
 import javax.faces.view.facelets.FaceletException;
 import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote;
 import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
@@ -49,30 +45,13 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
        /**
         * Remote EJB for phone number (administrative)
         */
-       private AdminContactsPhoneSessionBeanRemote adminRemoteBean;
+       private AdminContactsPhoneSessionBeanRemote adminPhoneBean;
 
        /**
         * Cell phone number
         */
        private DialableCellphoneNumber cellPhone;
 
-       /**
-        * Instance of linked contact account
-        * <p>
-        * @deprecated This is a generic phone controller, not just for contact data
-        */
-       @Deprecated
-       private Contact contact;
-
-       /**
-        * "Cache" for contact lists, mostly only one is assigned. So this cache
-        * shouldn't grow beyond control.
-        * <p>
-        * @deprecated This is a generic phone controller, not just for contact data
-        */
-       @Deprecated
-       private final Map<Long, List<Contact>> contacts;
-
        /**
         * Fax number
         */
@@ -93,36 +72,11 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
                        Context context = new InitialContext();
 
                        // Try to lookup the beans
-                       this.adminRemoteBean = (AdminContactsPhoneSessionBeanRemote) context.lookup("java:global/jjobs-ejb/admincontactphone!org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote"); //NOI18N
+                       this.adminPhoneBean = (AdminContactsPhoneSessionBeanRemote) context.lookup("java:global/jjobs-ejb/admincontactphone!org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw it again
                        throw new FaceletException(e);
                }
-
-               // Init map
-               this.contacts = new HashMap<>(10);
-       }
-
-       @Override
-       @Deprecated
-       public List<Contact> allCellphoneContacts () {
-               // Get id
-               Long phoneId = this.getCellPhone().getPhoneId();
-
-               // Is cache there?
-               if (this.contacts.containsKey(phoneId)) {
-                       // Return cached version
-                       return this.contacts.get(phoneId);
-               } else {
-                       // Ask bean
-                       List<Contact> list = this.adminRemoteBean.allContacts(this.getCellPhone());
-
-                       // Store result in cache
-                       this.contacts.put(phoneId, list);
-
-                       // Return now-cached list
-                       return list;
-               }
        }
 
        @Override
@@ -135,18 +89,6 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
                this.cellPhone = cellPhone;
        }
 
-       @Override
-       @Deprecated
-       public Contact getContact () {
-               return this.contact;
-       }
-
-       @Override
-       @Deprecated
-       public void setContact (final Contact contact) {
-               this.contact = contact;
-       }
-
        @Override
        public DialableFaxNumber getFax () {
                return this.fax;
index b5f682665990e522f70583e05a5331642b7e90ce..62b7b1020e4da461aa6b2a65ef7f5e6759c21f0b 100644 (file)
@@ -17,8 +17,7 @@
 package org.mxchange.jjobs.beans.phone;
 
 import java.io.Serializable;
-import java.util.List;
-import org.mxchange.jcontacts.contact.Contact;
+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;
@@ -29,16 +28,9 @@ import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
  * <p>
  * @author Roland Haeder<roland@mxchange.org>
  */
+@Local
 public interface JobsAdminPhoneWebRequestController extends Serializable {
 
-       /**
-        * Getter for all contacts having current cellphone instance linked
-        * <p>
-        * @return List of all linked contacts
-        */
-       @Deprecated
-       List<Contact> allCellphoneContacts ();
-
        /**
         * Getter for dialable cellphone number instance
         * <p>
@@ -81,20 +73,4 @@ public interface JobsAdminPhoneWebRequestController extends Serializable {
         */
        void setCellPhone (final DialableCellphoneNumber cellPhone);
 
-       /**
-        * Getter for linked contact account
-        * <p>
-        * @return Linked contact account
-        */
-       @Deprecated
-       Contact getContact ();
-
-       /**
-        * Setter for linked contact account
-        * <p>
-        * @param contact Linked contact account
-        */
-       @Deprecated
-       void setContact (final Contact contact);
-
 }
index 7749593d2752d4b214eae76e60e5596ce7027112..2d84ab9f265c7bd93ee9494d9ff9f025b1c2ec00 100644 (file)
@@ -407,20 +407,20 @@ ADMIN_LINK_DELETE_SHORT_TITLE=Eintrag l\u00f6schen.
 ADMIN_LINK_UNLINK_SHORT=Abtrennen
 ADMIN_LINK_UNLINK_SHORT_TITLE=Entfernt Verkn\u00fcpfung zum Eintrag.
 PAGE_TITLE_ADMIN_DELETE_CELLPHONE=Mobiletelefoneintrag eines Kontaktes l\u00f6schen
-CONTENT_TITLE_ADMIN_DELETE_CONTACT_CELLPHONE=Mobiltelefoneintrag eines Kontaktes l\u00f6schen:
+CONTENT_TITLE_ADMIN_DELETE_CELLPHONE=Mobiltelefoneintrag eines Kontaktes l\u00f6schen:
 PAGE_TITLE_ADMIN_EDIT_CELLPHONE=Mobiltelefoneintrag eines Kontaktes editieren
-CONTENT_TITLE_ADMIN_EDIT_CONTACT_CELLPHONE=Mobiltelefoneintrag eines Kontaktes editieren:
+CONTENT_TITLE_ADMIN_EDIT_CELLPHONE=Mobiltelefoneintrag eines Kontaktes editieren:
 PAGE_TITLE_ADMIN_LIST_CONTACT_CELLPHONE=Eintr\u00e4ge von Mobiletelefonen auflisten
-PAGE_TITLE_ADMIN_SHOW_CONTACT_CELLPHONE=Mobiltelefoneintrag eines Kontaktes anzeigen
-CONTENT_TITLE_ADMIN_SHOW_CONTACT_CELLPHONE=Anzeigen eines Mobiltelefoneintrags eines Kontaktes:
+PAGE_TITLE_ADMIN_SHOW_CELLPHONE=Mobiltelefoneintrag eines Kontaktes anzeigen
+CONTENT_TITLE_ADMIN_SHOW_CELLPHONE=Anzeigen eines Mobiltelefoneintrags eines Kontaktes:
 PAGE_TITLE_ADMIN_UNLINK_CONTACT_CELLPHONE=Verkn\u00fcpfung Kontakt-Mobiletelfon l\u00f6schen
 CONTENT_TITLE_ADMIN_UNLINK_CONTACT_CELLPHONE=Entfernen einer Verkn\u00fcpfung Kontakt-Mobiltelefon:
 ERROR_PARAMETER_PHONE_ID_NOT_SET=Fehler: Parameter 'phoneId' ist nicht gesetzt.
 PAGE_TITLE_ADMIN_SHOW_MOBILE_PROVIDER=Mobilfunkbetreiber anzeigen
 CONTENT_TITLE_ADMIN_SHOW_MOBILE_PROVIDER=Mobilfunkbetreiber anzeigen:
-TABLE_SUMMARY_ADMIN_SHOW_CONTACT_CELLPHONE=Ein einzelner Mobiltelefoneintrag eines Kontaktes.
-TABLE_SUMMARY_ADMIN_SHOW_CONTACT_CELLPHONE_LINKS=Diese Tabelle zeigt Verkn\u00fcpfungen von der Mobilfunknummern zu allen Kontaktdaten an.
-ADMIN_HEADER_SHOW_CONTACT_CELLPHONE_LINKS=Alle Kontakt-Mobiltelefon-Verkn\u00fcpfungen f\u00fcr Id-Nummer {0}:
+TABLE_SUMMARY_ADMIN_SHOW_CELLPHONE=Ein einzelner Mobiltelefoneintrag eines Kontaktes.
+TABLE_SUMMARY_ADMIN_SHOW_CELLPHONE_LINKS=Diese Tabelle zeigt Verkn\u00fcpfungen von der Mobilfunknummern zu allen Kontaktdaten an.
+ADMIN_HEADER_SHOW_CELLPHONE_LINKS=Alle Kontakt-Mobiltelefon-Verkn\u00fcpfungen f\u00fcr Id-Nummer {0}:
 ERROR_PARAMETER_CONTACT_ID_NOT_SET=Fehler: Parameter 'contactId' ist nicht gesetzt.
 ADMIN_SHOW_CELLPHONE_UNLINK=Trennen:
 ADMIN_CONTACT_ID=Kontakt-Id:
@@ -600,3 +600,4 @@ CONTENT_TITLE_ADMIN_LOCK_USER=Benutzeraccount sperren:
 ERROR_BEAN_HELPER_USER_NOT_SET=Fehler: Instanz 'user' im Bean-Helper nicht gesetzt.
 ERROR_BEAN_HELPER_CONTACT_NOT_SET=Fehler: Instanz 'contact' im Bean-Helper nicht gesetzt.
 ERROR_ADMIN_BEAN_CELLPHONE_NUMBER_NOT_SET=Fehler: Instanz 'cellPhone' in administrativer Bean nicht gesetzt.
+CONTENT_TITLE_ADMIN_LIST_CONTACT_CELLPHONE=Mobiltelefonnummern auflisten:
index 340e5951716691da04aff9d102f04327be2cb067..0f1b52f170ad55f7ef0df69526f8232a6dc89c8e 100644 (file)
@@ -390,20 +390,20 @@ ADMIN_LINK_DELETE_SHORT_TITLE=Delete entry.
 ADMIN_LINK_UNLINK_SHORT=Unlink
 ADMIN_LINK_UNLINK_SHORT_TITLE=Removes link to entry.
 PAGE_TITLE_ADMIN_DELETE_CELLPHONE=Delete contact's cellphone entry
-CONTENT_TITLE_ADMIN_DELETE_CONTACT_CELLPHONE=Delete contact's cellphone entry:
+CONTENT_TITLE_ADMIN_DELETE_CELLPHONE=Delete contact's cellphone entry:
 PAGE_TITLE_ADMIN_EDIT_CELLPHONE=Edit contact's cellphone entry
-CONTENT_TITLE_ADMIN_EDIT_CONTACT_CELLPHONE=Edit contact's cellphone entry:
+CONTENT_TITLE_ADMIN_EDIT_CELLPHONE=Edit contact's cellphone entry:
 PAGE_TITLE_ADMIN_LIST_CONTACT_CELLPHONE=List all cellphone entries
-PAGE_TITLE_ADMIN_SHOW_CONTACT_CELLPHONE=Show contact's cellphone entry
-CONTENT_TITLE_ADMIN_SHOW_CONTACT_CELLPHONE=Show contact's cellphone entry:
+PAGE_TITLE_ADMIN_SHOW_CELLPHONE=Show contact's cellphone entry
+CONTENT_TITLE_ADMIN_SHOW_CELLPHONE=Show contact's cellphone entry:
 PAGE_TITLE_ADMIN_UNLINK_CONTACT_CELLPHONE=Remove link contact-cellphone
 CONTENT_TITLE_ADMIN_UNLINK_CONTACT_CELLPHONE=Remove link between contact-cellphone:
 ERROR_PARAMETER_PHONE_ID_NOT_SET=Error: Parameter 'phoneId' is not set.
 PAGE_TITLE_ADMIN_SHOW_MOBILE_PROVIDER=Show mobile provider
 CONTENT_TITLE_ADMIN_SHOW_MOBILE_PROVIDER=Show mobile provider:
-TABLE_SUMMARY_ADMIN_SHOW_CONTACT_CELLPHONE=A single contact's cellphone entry.
-TABLE_SUMMARY_ADMIN_SHOW_CONTACT_CELLPHONE_LINKS=This table shows links of of this cellphone number to all contacts.
-ADMIN_HEADER_SHOW_CONTACT_CELLPHONE_LINKS=All links between contact-cellphone for id {0}:
+TABLE_SUMMARY_ADMIN_SHOW_CELLPHONE=A single contact's cellphone entry.
+TABLE_SUMMARY_ADMIN_SHOW_CELLPHONE_LINKS=This table shows links of of this cellphone number to all contacts.
+ADMIN_HEADER_SHOW_CELLPHONE_LINKS=All links between contact-cellphone for id {0}:
 ERROR_PARAMETER_CONTACT_ID_NOT_SET=Error: Parameter 'contactId' is not set.
 ADMIN_SHOW_CELLPHONE_UNLINK=Unlink:
 ADMIN_CONTACT_ID=Contact id:
@@ -600,3 +600,4 @@ CONTENT_TITLE_ADMIN_LOCK_USER=Lock user account:
 ERROR_BEAN_HELPER_USER_NOT_SET=Error: Instance 'user' not set in bean helper.
 ERROR_BEAN_HELPER_CONTACT_NOT_SET=Error: Instance 'contact' not set in bean helper.
 ERROR_ADMIN_BEAN_CELLPHONE_NUMBER_NOT_SET=Error: Instance 'cellPhone' in administrative bean not set.
+CONTENT_TITLE_ADMIN_LIST_CONTACT_CELLPHONE=List mobile phone numbers:
index 0f7c58db05edddacaff8aa6ffebcd479771deb67..73c83b81221534debdf8ecc3b23805f55af4e0f0 100644 (file)
                </navigation-case>
                <navigation-case>
                        <from-outcome>admin_show_cellphone</from-outcome>
-                       <to-view-id>/admin/cellphone/admin_contact_cellphone_show.xhtml</to-view-id>
+                       <to-view-id>/admin/cellphone/admin_cellphone_show.xhtml</to-view-id>
                </navigation-case>
                <navigation-case>
                        <from-outcome>admin_edit_cellphone</from-outcome>
-                       <to-view-id>/admin/cellphone/admin_contact_cellphone_edit.xhtml</to-view-id>
+                       <to-view-id>/admin/cellphone/admin_cellphone_edit.xhtml</to-view-id>
                </navigation-case>
                <navigation-case>
                        <from-outcome>admin_unlink_contact_cellphone</from-outcome>
                </navigation-case>
                <navigation-case>
                        <from-outcome>admin_delete_cellphone</from-outcome>
-                       <to-view-id>/admin/cellphone/admin_contact_cellphone_delete.xhtml</to-view-id>
+                       <to-view-id>/admin/cellphone/admin_cellphone_delete.xhtml</to-view-id>
                </navigation-case>
                <navigation-case>
                        <from-outcome>admin_edit_user</from-outcome>
diff --git a/web/admin/cellphone/admin_cellphone_delete.xhtml b/web/admin/cellphone/admin_cellphone_delete.xhtml
new file mode 100644 (file)
index 0000000..72a387f
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <f:metadata>
+               <f:viewParam name="phoneId" value="#{adminPhoneController.cellPhone}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_DELETE_CELLPHONE}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_DELETE_CELLPHONE}
+               </ui:define>
+
+               <ui:define name="content">
+                       Here goes your content.
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/admin/cellphone/admin_cellphone_edit.xhtml b/web/admin/cellphone/admin_cellphone_edit.xhtml
new file mode 100644 (file)
index 0000000..31a3d1c
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <f:metadata>
+               <f:viewParam name="phoneId" value="#{adminPhoneController.cellPhone}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_EDIT_CELLPHONE}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_EDIT_CELLPHONE}
+               </ui:define>
+
+               <ui:define name="content">
+                       Here goes your content.
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/admin/cellphone/admin_cellphone_show.xhtml b/web/admin/cellphone/admin_cellphone_show.xhtml
new file mode 100644 (file)
index 0000000..32f5ccd
--- /dev/null
@@ -0,0 +1,92 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <f:metadata>
+               <f:viewParam name="phoneId" value="#{adminPhoneController.cellPhone}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_CELLPHONE}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_SHOW_CELLPHONE}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_data.tpl">
+                               <ui:param name="isShowPage" value="#{true}" />
+                       </ui:include>
+
+                       <h:dataTable id="contact_cellphone_link" var="contact" value="#{adminPhoneController.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.cellPhone.phoneId}" />
+                                       </h:outputFormat>
+                               </f:facet>
+
+                               <h:column>
+                                       <h:outputLabel for="contactId" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ID}" />
+
+                                       <h:link id="contactId" styleClass="data_field" outcome="admin_show_contact">
+                                               <h:outputText value="#{contact.contactId}" />
+                                               <f:param name="contactId" value="#{contact.contactId}" />
+                                       </h:link>
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_CONTACT_GENDER}" />
+
+                                       <h:outputText id="contactGender" styleClass="data_field" value="#{msg[contact.contactGender.messageKey]}" />
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_CONTACT_TITLE}" />
+
+                                       <h:outputText id="contactTitle" styleClass="data_field" value="#{contact.contactTitle}" />
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
+
+                                       <h:outputText id="contactFirstName" styleClass="data_field" value="#{contact.contactFirstName}" />
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
+
+                                       <h:outputText id="contactFamilyName" styleClass="data_field" value="#{contact.contactFamilyName}" />
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
+
+                                       <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{contact.contactEmailAddress}">
+                                               <h:outputText value="#{contact.contactEmailAddress}" />
+                                       </h:outputLink>
+                               </h:column>
+
+                               <h:column>
+                                       <h:outputLabel for="cellphoneLinks" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_UNLINK}" />
+
+                                       <div id="cellphoneLinks" class="data_field">
+                                               <ul class="mini_nav">
+                                                       <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.cellPhone.phoneId}" />
+                                                                       <f:param name="contactId" value="#{contact.contactId}" />
+                                                               </h:link>
+                                                       </li>
+                                               </ul>
+                                       </div>
+                               </h:column>
+                       </h:dataTable>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/admin/cellphone/admin_contact_cellphone_delete.xhtml b/web/admin/cellphone/admin_contact_cellphone_delete.xhtml
deleted file mode 100644 (file)
index 2261c4e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
-       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-       xmlns:h="http://xmlns.jcp.org/jsf/html"
-       xmlns:f="http://xmlns.jcp.org/jsf/core"
-       >
-
-       <f:metadata>
-               <f:viewParam name="phoneId" value="#{adminPhoneController.cellPhone}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
-       </f:metadata>
-
-       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
-               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_DELETE_CELLPHONE}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_ADMIN_DELETE_CONTACT_CELLPHONE}
-               </ui:define>
-
-               <ui:define name="content">
-                       Here goes your content.
-               </ui:define>
-       </ui:composition>
-</html>
diff --git a/web/admin/cellphone/admin_contact_cellphone_edit.xhtml b/web/admin/cellphone/admin_contact_cellphone_edit.xhtml
deleted file mode 100644 (file)
index 95939c2..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
-       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-       xmlns:h="http://xmlns.jcp.org/jsf/html"
-       xmlns:f="http://xmlns.jcp.org/jsf/core"
-       >
-
-       <f:metadata>
-               <f:viewParam name="phoneId" value="#{adminPhoneController.cellPhone}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
-       </f:metadata>
-
-       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
-               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_EDIT_CELLPHONE}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_ADMIN_EDIT_CONTACT_CELLPHONE}
-               </ui:define>
-
-               <ui:define name="content">
-                       Here goes your content.
-               </ui:define>
-       </ui:composition>
-</html>
index 5ba61eba5eb6208ad349964cd1ae063de9e03c8f..e3e4aa93143926b209407cd991c0b5708aa77b8d 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       Here goes your 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:column>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{msg.ADMIN_SHOW_CELLPHONE_ID}" />
+                                       </f:facet>
+                               </h:column>
+                       </h:dataTable>
                </ui:define>
        </ui:composition>
 </html>
diff --git a/web/admin/cellphone/admin_contact_cellphone_show.xhtml b/web/admin/cellphone/admin_contact_cellphone_show.xhtml
deleted file mode 100644 (file)
index 7a8be2a..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
-       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-       xmlns:h="http://xmlns.jcp.org/jsf/html"
-       xmlns:f="http://xmlns.jcp.org/jsf/core"
-       >
-
-       <f:metadata>
-               <f:viewParam name="phoneId" value="#{adminPhoneController.cellPhone}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
-       </f:metadata>
-
-       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
-               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_CONTACT_CELLPHONE}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_ADMIN_SHOW_CONTACT_CELLPHONE}
-               </ui:define>
-
-               <ui:define name="content">
-                       <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_data.tpl">
-                               <ui:param name="isShowPage" value="#{true}" />
-                       </ui:include>
-
-                       <h:dataTable id="contact_cellphone_link" var="contact" value="#{adminPhoneController.allCellphoneContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_CONTACT_CELLPHONE_LINKS}" headerClass="table_header_column" styleClass="table_medium">
-                               <f:facet name="header">
-                                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_CONTACT_CELLPHONE_LINKS}">
-                                               <f:param value="#{adminPhoneController.cellPhone.phoneId}" />
-                                       </h:outputFormat>
-                               </f:facet>
-
-                               <h:column>
-                                       <h:outputLabel for="contactId" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ID}" />
-
-                                       <h:link id="contactId" styleClass="data_field" outcome="admin_show_contact">
-                                               <h:outputText value="#{contact.contactId}" />
-                                               <f:param name="contactId" value="#{contact.contactId}" />
-                                       </h:link>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_CONTACT_GENDER}" />
-
-                                       <h:outputText id="contactGender" styleClass="data_field" value="#{msg[contact.contactGender.messageKey]}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_CONTACT_TITLE}" />
-
-                                       <h:outputText id="contactTitle" styleClass="data_field" value="#{contact.contactTitle}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
-
-                                       <h:outputText id="contactFirstName" styleClass="data_field" value="#{contact.contactFirstName}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
-
-                                       <h:outputText id="contactFamilyName" styleClass="data_field" value="#{contact.contactFamilyName}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
-
-                                       <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{contact.contactEmailAddress}">
-                                               <h:outputText value="#{contact.contactEmailAddress}" />
-                                       </h:outputLink>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="cellphoneLinks" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_UNLINK}" />
-
-                                       <div id="cellphoneLinks" class="data_field">
-                                               <ul class="mini_nav">
-                                                       <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.cellPhone.phoneId}" />
-                                                                       <f:param name="contactId" value="#{contact.contactId}" />
-                                                               </h:link>
-                                                       </li>
-                                               </ul>
-                                       </div>
-                               </h:column>
-                       </h:dataTable>
-               </ui:define>
-       </ui:composition>
-</html>
index 0b71610b9e48335d301cd46f7fb30f6fe8b57629..715d7bc97e0e5d605dbbe15a2f401dd4b856d4e5 100644 (file)
@@ -9,7 +9,7 @@
 
        <f:metadata>
                <f:viewParam name="phoneId" value="#{adminPhoneController.cellPhone}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
-               <f:viewParam name="contactId" value="#{adminPhoneController.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
+               <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
        </f:metadata>
 
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">