]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 19 May 2016 11:42:54 +0000 (13:42 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 21 May 2016 10:48:25 +0000 (12:48 +0200)
- renamed adminHelper to beanHelp as this is a really generic bean helper
- renames same class/interface, too
- added JSF page for confirming accounts with optional parameter confirmKey. If this is not set, a message will be shown
- added i18n keys for above new page
- added controller bean for above page to handle the confirmation + calling proper EJB business method

Signed-off-by: Roland Häder <roland@mxchange.org>
27 files changed:
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
src/java/org/mxchange/pizzaapplication/beans/confirmlink/PizzaConfirmationLinkWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/confirmlink/PizzaConfirmationLinkWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestController.java [deleted file]
src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestHelper.java [deleted file]
src/java/org/mxchange/pizzaapplication/beans/helper/PizzaWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/helper/PizzaWebRequestHelper.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java
web/WEB-INF/templates/admin/contact/admin_contact_data.tpl
web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl [new file with mode: 0644]
web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl
web/admin/contact/admin_contact_delete.xhtml
web/admin/contact/admin_contact_edit.xhtml
web/admin/contact/admin_contact_list.xhtml
web/admin/contact/admin_contact_show.xhtml
web/admin/country/admin_country_list.xhtml
web/admin/mobile_provider/admin_mobile_provider_list.xhtml
web/admin/user/admin_user_delete.xhtml
web/admin/user/admin_user_edit.xhtml
web/admin/user/admin_user_list.xhtml
web/admin/user/admin_user_show.xhtml
web/admin/user/admin_user_unlock.xhtml
web/customer/empty_basket.xhtml
web/guest/user/confirm_account.xhtml [new file with mode: 0644]

index ab68dd949ac84d9eefc8626637879c9b19b00891..d6663b127c4cb60e7f8ffdc96afde16566c15cbb 100644 (file)
@@ -502,3 +502,10 @@ GUEST_RESEND_LINK_ENTER_EMAIL_ADDRESS=Bitte bei der Anmeldung verwendete Email-A
 GUEST_RESEND_CONFIRMATION_LINK_NOTICE=Der alte Best\u00e4tigungslink wird hiernach verfallen, bitte dann den aus der neueren Mail verwenden.
 RESEND_CONFIRMATION_LINK_LEGEND=Email-Adresse eingeben:
 RESEND_CONFIRMATION_LINK_LEGEND_TITLE=Bitte geben Sie Ihre Email-Adresse ein, die Sie bei der Anmeldung verwendet haben.
+PAGE_TITLE_INDEX_CONFIRM_ACCOUNT=Anmeldung best\u00e4tigen
+CONTENT_TITLE_INDEX_CONFIRM_ACCOUNT=Benutzeranmeldung best\u00e4tigen:
+GUEST_CONFIRMATION_LINK_INVALID=Best\u00e4tigungslink nicht mehr g\u00fcltig. Bitte lassen Sie sich einen neuen Link zusenden oder wenden Sie sich an den Support.
+GUEST_CONFIRMATION_KEY_NOT_SET=Es wurde keine Best\u00e4tigungsschl\u00fcssel angegeben. Bitte pr\u00fcfen Sie den Link aus der Mail.
+GUEST_CONFIRM_USER_ACCOUNT_DONE_TITLE=Vielen Dank f\u00fcr die Best\u00e4tigung
+GUEST_USER_CONFIRM_ACCOUNT_DONE=Hallo {0} {1} {2}. Sie haben soeben Ihren Account best\u00e4tigt. Es ist eine Mail mit weiteren Details an Sie unterwegs.
+BUTTON_GUEST_CONFIRM_USER_ACCOUNT=Account best\u00e4tigen
index edcecd1a93967cb3309ab5020bf1c02b5c3ff01f..e6a57d21ac5511dcf39bd78f3114387f00c07ff5 100644 (file)
@@ -486,3 +486,10 @@ LOGIN_CHANGE_PERSONAL_DATA_TITLE=Change personal data:
 LINK_LOGIN_CHANGE_PASSWORD_TITLE=Change here your password, if you want another one.
 LINK_LOGIN_CHANGE_EMAIL_ADDRESS=Change your email address
 LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD=Restore your password
+PAGE_TITLE_INDEX_CONFIRM_ACCOUNT=Confirm registration
+CONTENT_TITLE_INDEX_CONFIRM_ACCOUNT=Confirm user registration:
+GUEST_CONFIRMATION_LINK_INVALID=Confirmation link is no longer valid. Please try to send a new link to your email address or contact support.
+GUEST_CONFIRMATION_KEY_NOT_SET=No confirmation key was provided. Please check the link from the mail.
+GUEST_CONFIRM_USER_ACCOUNT_DONE_TITLE=Thank you for confirmation of your account
+GUEST_USER_CONFIRM_ACCOUNT_DONE=Hello {0} {1} {2}. You have successfully confirmed your account. An email with more details is on it's way to you.
+BUTTON_GUEST_CONFIRM_USER_ACCOUNT=Confirm account
diff --git a/src/java/org/mxchange/pizzaapplication/beans/confirmlink/PizzaConfirmationLinkWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/confirmlink/PizzaConfirmationLinkWebRequestBean.java
new file mode 100644 (file)
index 0000000..3a21f72
--- /dev/null
@@ -0,0 +1,198 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.pizzaapplication.beans.confirmlink;
+
+import java.text.MessageFormat;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Objects;
+import javax.enterprise.context.RequestScoped;
+import javax.faces.view.facelets.FaceletException;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jcoreee.utils.FacesUtils;
+import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
+import org.mxchange.jusercore.exceptions.UserStatusLockedException;
+import org.mxchange.jusercore.model.user.User;
+import org.mxchange.jusercore.model.user.UserSessionBeanRemote;
+import org.mxchange.jusercore.model.user.status.UserAccountStatus;
+import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestController;
+import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController;
+
+/**
+ * A web request bean for confirmation link handling
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Named ("confirmationLinkController")
+@RequestScoped
+public class PizzaConfirmationLinkWebRequestBean extends BasePizzaController implements PizzaConfirmationLinkWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 57_637_182_796_370L;
+
+       /**
+        * Admin helper instance
+        */
+       @Inject
+       private PizzaWebRequestController beanHelper;
+
+       /**
+        * Confirmation key
+        */
+       private String confirmationKey;
+
+       /**
+        * Remote user bean
+        */
+       private final UserSessionBeanRemote userBean;
+
+       /**
+        * User controller
+        */
+       @Inject
+       private PizzaUserWebSessionController userController;
+
+       /**
+        * Default constructor
+        */
+       public PizzaConfirmationLinkWebRequestBean () {
+               // Try it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup
+                       this.userBean = (UserSessionBeanRemote) context.lookup("java:global/jlandingpage-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
+               } catch (final NamingException e) {
+                       // Throw again
+                       throw new FaceletException(e);
+               }
+       }
+
+       @Override
+       public String getConfirmationKey () {
+               return this.confirmationKey;
+       }
+
+       @Override
+       public void setConfirmationKey (final String confirmationKey) {
+               this.confirmationKey = confirmationKey;
+       }
+
+       @Override
+       public void maybeConfirmUserAccount () {
+               // Is the confirmation key set?
+               if (this.getConfirmationKey() == null) {
+                       // May be null if not set
+                       return;
+               } else if (this.getConfirmationKey().isEmpty()) {
+                       // Is empty string
+                       return;
+               }
+
+               // Now try to find the user in user list, first get the whole list
+               List<User> users = this.userController.allUsers();
+
+               // Get iterator from it
+               Iterator<User> iterator = users.iterator();
+
+               // Init instance
+               User user = null;
+
+               // Then loop through all
+               while (iterator.hasNext()) {
+                       // Get next user
+                       User next = iterator.next();
+
+                       // Same confirmation key?
+                       if (Objects.equals(this.getConfirmationKey(), next.getUserConfirmKey())) {
+                               // Found it, then set it and abort loop
+                               user = next;
+                               break;
+                       }
+               }
+
+               // Is the user instance null?
+               if ((null == user) || (user.getUserAccountStatus() != UserAccountStatus.UNCONFIRMED)) {
+                       // Then clear this bean and the helper
+                       this.beanHelper.setUser(null);
+               } else {
+                       // Set user ...
+                       this.beanHelper.setUser(user);
+
+                       // ... and copy it to the controller
+                       this.beanHelper.copyUserToController();
+
+                       // Try to confirm it
+                       this.confirmUserAccount();
+               }
+       }
+
+       /**
+        * Tries to confirm the currently set user instance (in helper).
+        */
+       private void confirmUserAccount () {
+               // Get user instance
+               User user = this.beanHelper.getUser();
+
+               // Should be set
+               if (null == user) {
+                       // Throw NPE
+                       throw new NullPointerException("user is null");
+               } else if (user.getUserId() == null) {
+                       // Abort here
+                       throw new NullPointerException("user.userId is null"); //NOI18N
+               } else if (user.getUserId() < 1) {
+                       // Invalid number
+                       throw new IllegalArgumentException(MessageFormat.format("userId is not valid: {0}", user.getUserId())); //NOI18N
+               } else if (user.getUserAccountStatus() == UserAccountStatus.CONFIRMED) {
+                       // Account is already confirmed
+                       throw new FaceletException(new UserStatusConfirmedException(user));
+               } else if (user.getUserAccountStatus() == UserAccountStatus.LOCKED) {
+                       // Account is already confirmed
+                       throw new FaceletException(new UserStatusLockedException(user));
+               } else if (user.getUserConfirmKey() == null) {
+                       // Throw NPE
+                       throw new NullPointerException("user.userConfirmKey is null"); //NOI18N
+               }
+
+               // Updated user instance
+               User updatedUser;
+
+               try {
+                       // Get base URL
+                       String baseUrl = FacesUtils.generateBaseUrl();
+
+                       // Confirm account
+                       updatedUser = this.userBean.confirmAccount(user, baseUrl);
+               } catch (final UserStatusConfirmedException | UserStatusLockedException ex) {
+                       // Something unexpected happened
+                       throw new FaceletException(MessageFormat.format("Cannot confirm user account {0}", user.getUserName()), ex); //NOI18N
+               }
+
+               // Set it again in helper
+               this.beanHelper.setUser(updatedUser);
+       }
+
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/confirmlink/PizzaConfirmationLinkWebRequestController.java b/src/java/org/mxchange/pizzaapplication/beans/confirmlink/PizzaConfirmationLinkWebRequestController.java
new file mode 100644 (file)
index 0000000..38d4c90
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.pizzaapplication.beans.confirmlink;
+
+import java.io.Serializable;
+
+/**
+ * An interface for an email change controller
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface PizzaConfirmationLinkWebRequestController extends Serializable {
+
+       /**
+        * Getter for confirmation key
+        * <p>
+        * @return Confirmation key
+        */
+       String getConfirmationKey ();
+
+       /**
+        * Setter for confirmation key
+        * <p>
+        * @param confirmationKey Confirmation key
+        */
+       void setConfirmationKey (final String confirmationKey);
+
+       /**
+        * Tries to lookup the user by currently set confirmation key and if found
+        * tries to confirm it. If no user is found, the instance beanHelper.user is
+        * set to null. Other methods or JSF pages should then respond on this
+        * accordingly.
+        */
+       void maybeConfirmUserAccount ();
+
+}
index 19224194d37a5b6b457e56225d4d519fb8d6b7fa..001a61574e1c7eea1f0f8f1e1eb4e77557052a07 100644 (file)
@@ -48,7 +48,7 @@ import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
 import org.mxchange.pizzaapplication.beans.BasePizzaController;
-import org.mxchange.pizzaapplication.beans.helper.PizzaAdminWebRequestController;
+import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestController;
 
 /**
  * Administrative user bean (controller)
@@ -75,7 +75,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
         * Admin helper instance
         */
        @Inject
-       private PizzaAdminWebRequestController adminHelper;
+       private PizzaWebRequestController beanHelper;
 
        /**
         * Birth day
@@ -442,18 +442,18 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
        @Override
        public String editContactData () {
                // Get contact instance
-               Contact contact = this.adminHelper.getContact();
+               Contact contact = this.beanHelper.getContact();
 
                // Check if contact instance is in helper and valid
                if (null == contact) {
                        // Throw NPE
-                       throw new NullPointerException("adminHelper.contact is null"); //NOI18N
+                       throw new NullPointerException("beanHelper.contact is null"); //NOI18N
                } else if (contact.getContactId() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("adminHelper.contact.contactId is null"); //NOI18N //NOI18N
+                       throw new NullPointerException("beanHelper.contact.contactId is null"); //NOI18N //NOI18N
                } else if (contact.getContactId() < 1) {
                        // Invalid id
-                       throw new IllegalStateException(MessageFormat.format("adminHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N
+                       throw new IllegalStateException(MessageFormat.format("beanHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N
                }
 
                // Update all data in contact
index 3a11d7dd38800d06509ee6cab4b320560f1ff3cb..0c16549d1112d5ec0009c8fb8dc74a4784c2548f 100644 (file)
@@ -37,9 +37,9 @@ import org.mxchange.jcustomercore.model.customer.Customer;
 import org.mxchange.jcustomercore.model.customer.status.CustomerAccountStatus;
 import org.mxchange.pizzaapplication.beans.BasePizzaController;
 import org.mxchange.pizzaapplication.beans.contact.PizzaAdminContactWebRequestController;
-import org.mxchange.pizzaapplication.beans.helper.PizzaAdminWebRequestController;
 import org.mxchange.pizzaapplication.model.customer.PizzaAdminCustomerSessionBeanRemote;
 import org.mxchange.pizzaapplication.model.customer.PizzaCustomer;
+import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestController;
 
 /**
  * Administrative customer bean (controller)
@@ -70,7 +70,7 @@ public class PizzaAdminCustomerWebRequestBean extends BasePizzaController implem
         * Admin helper instance
         */
        @Inject
-       private PizzaAdminWebRequestController adminHelper;
+       private PizzaWebRequestController adminHelper;
 
        /**
         * An event being fired when an administrator has added a new customer
diff --git a/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestController.java b/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestController.java
deleted file mode 100644 (file)
index 097daf1..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Haeder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.pizzaapplication.beans.helper;
-
-import java.io.Serializable;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcustomercore.model.customer.Customer;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An interface for general bean helper
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-public interface PizzaAdminWebRequestController extends Serializable {
-
-       /**
-        * Getter for user instance
-        * <p>
-        * @return User instance
-        */
-       User getUser ();
-
-       /**
-        * Setter for user instance
-        * <p>
-        * @param user User instance
-        */
-       void setUser (final User user);
-
-       /**
-        * Copies currently set user instance's data to adminUserController
-        */
-       void copyUserToController ();
-
-       /**
-        * Returns a message key depending on if this contact is a user and/or a
-        * contact. If this contact is unused, a default key is returned.
-        * <p>
-        * @param contact Contact instance to check
-        * <p>
-        * @return Message key
-        */
-       String getContactUsageMessageKey (final Contact contact);
-
-       /**
-        * Getter for contact instance
-        * <p>
-        * @return Contact instance
-        */
-       Contact getContact ();
-
-       /**
-        * Setter for contact instance
-        * <p>
-        * @param contact Contact instance
-        */
-       void setContact (final Contact contact);
-
-       /**
-        * Getter for customer instance
-        * <p>
-        * @return Customer instance
-        */
-       Customer getCustomer ();
-
-       /**
-        * Setter for customer instance
-        * <p>
-        * @param customer Contact instance
-        */
-       void setCustomer (final Customer customer);
-
-       /**
-        * Copies currently set contact instance's data to adminContactController
-        */
-       void copyContactToController ();
-
-       /**
-        * Copies currently set customer instance's data to adminCustomerController
-        */
-       void copyCustomerToController ();
-
-}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestHelper.java b/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaAdminWebRequestHelper.java
deleted file mode 100644 (file)
index f06c3c5..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Haeder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.pizzaapplication.beans.helper;
-
-import java.text.MessageFormat;
-import javax.enterprise.context.RequestScoped;
-import javax.inject.Inject;
-import javax.inject.Named;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcustomercore.model.customer.Customer;
-import org.mxchange.jusercore.model.user.User;
-import org.mxchange.pizzaapplication.beans.contact.PizzaAdminContactWebRequestController;
-import org.mxchange.pizzaapplication.beans.customer.PizzaAdminCustomerWebRequestController;
-import org.mxchange.pizzaapplication.beans.customer.PizzaCustomerWebSessionController;
-import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController;
-
-/**
- * A general helper for administrative beans
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Named ("adminHelper")
-@RequestScoped
-public class PizzaAdminWebRequestHelper implements PizzaAdminWebRequestController {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 17_258_793_567_145_701L;
-
-       /**
-        * Regular contact controller
-        */
-       @Inject
-       private PizzaAdminContactWebRequestController adminContactController;
-
-       /**
-        * Administrative user controller
-        */
-       @Inject
-       private PizzaAdminCustomerWebRequestController adminCustomerController;
-
-       /**
-        * Contact instance
-        */
-       private Contact contact;
-
-       /**
-        * Contact instance
-        */
-       private Customer customer;
-
-       /**
-        * General user controller
-        */
-       @Inject
-       private PizzaCustomerWebSessionController customerController;
-
-       /**
-        * User instance
-        */
-       private User user;
-
-       /**
-        * Regular user controller
-        */
-       @Inject
-       private PizzaUserWebSessionController userController;
-
-       /**
-        * Default constructor
-        */
-       public PizzaAdminWebRequestHelper () {
-       }
-
-       @Override
-       public void copyContactToController () {
-               // Log message
-               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyContactToController - CALLED!"); //NOI18N
-
-               // Validate user instance
-               if (this.getContact() == null) {
-                       // Throw NPE
-                       throw new NullPointerException("this.contact is null"); //NOI18N
-               } else if (this.getContact().getContactId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("this.contact.contactId is null"); //NOI18N
-               } else if (this.getContact().getContactId() < 1) {
-                       // Not valid
-                       throw new IllegalStateException(MessageFormat.format("this.contact.contactId={0} is not valid.", this.getContact().getContactId())); //NOI18N
-               }
-
-               // Set all fields: user
-               this.adminContactController.copyContactToController(this.getContact());
-
-               // Log message
-               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyContactToController - EXIT!"); //NOI18N
-       }
-
-       @Override
-       public void copyCustomerToController () {
-               // Log message
-               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyCustomerToController - CALLED!"); //NOI18N
-
-               // Validate user instance
-               if (this.getCustomer() == null) {
-                       // Throw NPE
-                       throw new NullPointerException("this.customer is null"); //NOI18N
-               } else if (this.getCustomer().getCustomerId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("this.customer.customerId is null"); //NOI18N
-               } else if (this.getCustomer().getCustomerId() < 1) {
-                       // Not valid
-                       throw new IllegalStateException(MessageFormat.format("this.customer.customerId={0} is not valid.", this.getCustomer().getCustomerId())); //NOI18N
-               }
-
-               // Set all fields: user
-               this.adminCustomerController.copyCustomerToController(this.getCustomer());
-
-               // Log message
-               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyCustomerToController - EXIT!"); //NOI18N
-       }
-
-       @Override
-       public void copyUserToController () {
-               // Log message
-               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyUserToController - CALLED!"); //NOI18N
-
-               // Validate user instance
-               if (this.getUser() == null) {
-                       // Throw NPE
-                       throw new NullPointerException("this.user is null"); //NOI18N
-               } else if (this.getUser().getUserId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("this.user.userId is null"); //NOI18N
-               } else if (this.getUser().getUserId() < 1) {
-                       // Not valid
-                       throw new IllegalStateException(MessageFormat.format("this.user.userId={0} is not valid.", this.getUser().getUserId())); //NOI18N
-               }
-
-               // Set all fields: user
-               this.userController.setUserName(this.getUser().getUserName());
-
-               // Log message
-               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyUserToController - EXIT!"); //NOI18N
-       }
-
-       @Override
-       public Contact getContact () {
-               return this.contact;
-       }
-
-       @Override
-       public void setContact (final Contact contact) {
-               this.contact = contact;
-       }
-
-       @Override
-       public String getContactUsageMessageKey (final Contact contact) {
-               // The contact must be valid
-               if (null == contact) {
-                       // Throw NPE
-                       throw new NullPointerException("contact is null"); //NOI18N
-               } else if (contact.getContactId() == null) {
-                       // Throw again ...
-                       throw new NullPointerException("contact.contactId is null"); //NOI18N
-               } else if (contact.getContactId() < 1) {
-                       // Not valid
-                       throw new IllegalArgumentException(MessageFormat.format("contact.contactId={0} is not valid", contact.getContactId())); //NOI18N
-               }
-
-               // Default key is "unused"
-               String messageKey = "CONTACT_IS_UNUSED"; //NOI18N
-
-               // Check user/customer
-               boolean isUserContact = this.userController.isContactFound(contact);
-               boolean isCustomerContact = this.customerController.isContactFound(contact);
-
-               // Check user first
-               if (isUserContact && isCustomerContact) {
-                       // Is both
-                       messageKey = "CONTACT_IS_USER_CUSTOMER"; //NOI18N
-               } else if (isUserContact) {
-                       // Only user
-                       messageKey = "CONTACT_IS_USER"; //NOI18N
-               } else if (isCustomerContact) {
-                       // Only customer
-                       messageKey = "CONTACT_IS_CUSTOMER"; //NOI18N
-               }
-
-               // Return message key
-               return messageKey;
-       }
-
-       @Override
-       public Customer getCustomer () {
-               return this.customer;
-       }
-
-       @Override
-       public void setCustomer (final Customer customer) {
-               this.customer = customer;
-       }
-
-       @Override
-       public User getUser () {
-               return this.user;
-       }
-
-       @Override
-       public void setUser (final User user) {
-               this.user = user;
-       }
-
-}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaWebRequestController.java b/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaWebRequestController.java
new file mode 100644 (file)
index 0000000..ebd963b
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.pizzaapplication.beans.helper;
+
+import java.io.Serializable;
+import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jcustomercore.model.customer.Customer;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for general bean helper
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface PizzaWebRequestController extends Serializable {
+
+       /**
+        * Getter for user instance
+        * <p>
+        * @return User instance
+        */
+       User getUser ();
+
+       /**
+        * Setter for user instance
+        * <p>
+        * @param user User instance
+        */
+       void setUser (final User user);
+
+       /**
+        * Copies currently set user instance's data to adminUserController
+        */
+       void copyUserToController ();
+
+       /**
+        * Returns a message key depending on if this contact is a user and/or a
+        * contact. If this contact is unused, a default key is returned.
+        * <p>
+        * @param contact Contact instance to check
+        * <p>
+        * @return Message key
+        */
+       String getContactUsageMessageKey (final Contact contact);
+
+       /**
+        * Getter for contact instance
+        * <p>
+        * @return Contact instance
+        */
+       Contact getContact ();
+
+       /**
+        * Setter for contact instance
+        * <p>
+        * @param contact Contact instance
+        */
+       void setContact (final Contact contact);
+
+       /**
+        * Getter for customer instance
+        * <p>
+        * @return Customer instance
+        */
+       Customer getCustomer ();
+
+       /**
+        * Setter for customer instance
+        * <p>
+        * @param customer Contact instance
+        */
+       void setCustomer (final Customer customer);
+
+       /**
+        * Copies currently set contact instance's data to adminContactController
+        */
+       void copyContactToController ();
+
+       /**
+        * Copies currently set customer instance's data to adminCustomerController
+        */
+       void copyCustomerToController ();
+
+}
diff --git a/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaWebRequestHelper.java b/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaWebRequestHelper.java
new file mode 100644 (file)
index 0000000..9873bba
--- /dev/null
@@ -0,0 +1,229 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.pizzaapplication.beans.helper;
+
+import java.text.MessageFormat;
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+import javax.inject.Named;
+import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jcustomercore.model.customer.Customer;
+import org.mxchange.jusercore.model.user.User;
+import org.mxchange.pizzaapplication.beans.contact.PizzaAdminContactWebRequestController;
+import org.mxchange.pizzaapplication.beans.customer.PizzaAdminCustomerWebRequestController;
+import org.mxchange.pizzaapplication.beans.customer.PizzaCustomerWebSessionController;
+import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController;
+
+/**
+ * A general helper for beans
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Named ("beanHelper")
+@RequestScoped
+public class PizzaWebRequestHelper implements PizzaWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 17_258_793_567_145_701L;
+
+       /**
+        * Regular contact controller
+        */
+       @Inject
+       private PizzaAdminContactWebRequestController adminContactController;
+
+       /**
+        * Administrative user controller
+        */
+       @Inject
+       private PizzaAdminCustomerWebRequestController adminCustomerController;
+
+       /**
+        * Contact instance
+        */
+       private Contact contact;
+
+       /**
+        * Contact instance
+        */
+       private Customer customer;
+
+       /**
+        * General user controller
+        */
+       @Inject
+       private PizzaCustomerWebSessionController customerController;
+
+       /**
+        * User instance
+        */
+       private User user;
+
+       /**
+        * Regular user controller
+        */
+       @Inject
+       private PizzaUserWebSessionController userController;
+
+       /**
+        * Default constructor
+        */
+       public PizzaWebRequestHelper () {
+       }
+
+       @Override
+       public void copyContactToController () {
+               // Log message
+               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyContactToController - CALLED!"); //NOI18N
+
+               // Validate user instance
+               if (this.getContact() == null) {
+                       // Throw NPE
+                       throw new NullPointerException("this.contact is null"); //NOI18N
+               } else if (this.getContact().getContactId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("this.contact.contactId is null"); //NOI18N
+               } else if (this.getContact().getContactId() < 1) {
+                       // Not valid
+                       throw new IllegalStateException(MessageFormat.format("this.contact.contactId={0} is not valid.", this.getContact().getContactId())); //NOI18N
+               }
+
+               // Set all fields: user
+               this.adminContactController.copyContactToController(this.getContact());
+
+               // Log message
+               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyContactToController - EXIT!"); //NOI18N
+       }
+
+       @Override
+       public void copyCustomerToController () {
+               // Log message
+               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyCustomerToController - CALLED!"); //NOI18N
+
+               // Validate user instance
+               if (this.getCustomer() == null) {
+                       // Throw NPE
+                       throw new NullPointerException("this.customer is null"); //NOI18N
+               } else if (this.getCustomer().getCustomerId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("this.customer.customerId is null"); //NOI18N
+               } else if (this.getCustomer().getCustomerId() < 1) {
+                       // Not valid
+                       throw new IllegalStateException(MessageFormat.format("this.customer.customerId={0} is not valid.", this.getCustomer().getCustomerId())); //NOI18N
+               }
+
+               // Set all fields: user
+               this.adminCustomerController.copyCustomerToController(this.getCustomer());
+
+               // Log message
+               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyCustomerToController - EXIT!"); //NOI18N
+       }
+
+       @Override
+       public void copyUserToController () {
+               // Log message
+               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyUserToController - CALLED!"); //NOI18N
+
+               // Validate user instance
+               if (this.getUser() == null) {
+                       // Throw NPE
+                       throw new NullPointerException("this.user is null"); //NOI18N
+               } else if (this.getUser().getUserId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("this.user.userId is null"); //NOI18N
+               } else if (this.getUser().getUserId() < 1) {
+                       // Not valid
+                       throw new IllegalStateException(MessageFormat.format("this.user.userId={0} is not valid.", this.getUser().getUserId())); //NOI18N
+               }
+
+               // Set all fields: user
+               this.userController.setUserName(this.getUser().getUserName());
+
+               // Log message
+               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyUserToController - EXIT!"); //NOI18N
+       }
+
+       @Override
+       public Contact getContact () {
+               return this.contact;
+       }
+
+       @Override
+       public void setContact (final Contact contact) {
+               this.contact = contact;
+       }
+
+       @Override
+       public String getContactUsageMessageKey (final Contact contact) {
+               // The contact must be valid
+               if (null == contact) {
+                       // Throw NPE
+                       throw new NullPointerException("contact is null"); //NOI18N
+               } else if (contact.getContactId() == null) {
+                       // Throw again ...
+                       throw new NullPointerException("contact.contactId is null"); //NOI18N
+               } else if (contact.getContactId() < 1) {
+                       // Not valid
+                       throw new IllegalArgumentException(MessageFormat.format("contact.contactId={0} is not valid", contact.getContactId())); //NOI18N
+               }
+
+               // Default key is "unused"
+               String messageKey = "CONTACT_IS_UNUSED"; //NOI18N
+
+               // Check user/customer
+               boolean isUserContact = this.userController.isContactFound(contact);
+               boolean isCustomerContact = this.customerController.isContactFound(contact);
+
+               // Check user first
+               if (isUserContact && isCustomerContact) {
+                       // Is both
+                       messageKey = "CONTACT_IS_USER_CUSTOMER"; //NOI18N
+               } else if (isUserContact) {
+                       // Only user
+                       messageKey = "CONTACT_IS_USER"; //NOI18N
+               } else if (isCustomerContact) {
+                       // Only customer
+                       messageKey = "CONTACT_IS_CUSTOMER"; //NOI18N
+               }
+
+               // Return message key
+               return messageKey;
+       }
+
+       @Override
+       public Customer getCustomer () {
+               return this.customer;
+       }
+
+       @Override
+       public void setCustomer (final Customer customer) {
+               this.customer = customer;
+       }
+
+       @Override
+       public User getUser () {
+               return this.user;
+       }
+
+       @Override
+       public void setUser (final User user) {
+               this.user = user;
+       }
+
+}
index 1b436a2edd21e461678a7f8afafc3d10162d8117..5eb5083332558e555a5dfa0203928fac4dd02f9e 100644 (file)
@@ -16,7 +16,6 @@
  */
 package org.mxchange.pizzaapplication.beans.user;
 
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
 import java.text.MessageFormat;
 import java.util.Objects;
 import javax.annotation.PostConstruct;
@@ -31,7 +30,6 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcontacts.contact.ContactSessionBeanRemote;
 import org.mxchange.jusercore.container.login.UserLoginContainer;
 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
 import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
@@ -47,9 +45,9 @@ import org.mxchange.jusercore.model.user.UserSessionBeanRemote;
 import org.mxchange.jusercore.model.user.UserUtils;
 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
+import org.mxchange.pizzaapplication.beans.BasePizzaController;
 import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebSessionController;
-import org.mxchange.pizzaapplication.beans.helper.PizzaAdminWebRequestController;
-import org.mxchange.pizzaapplication.beans.login.PizzaUserLoginWebSessionController;
+import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestController;
 
 /**
  * Administrative user bean (controller)
@@ -73,15 +71,10 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements
        private Event<AdminAddedUserEvent> addedUserEvent;
 
        /**
-        * Admin helper instance
+        * Bean helper instance
         */
        @Inject
-       private PizzaAdminWebRequestController adminHelper;
-
-       /**
-        * Remote user bean
-        */
-       private final ContactSessionBeanRemote contactBean;
+       private PizzaWebRequestController beanHelper;
 
        /**
         * Regular contact controller
@@ -107,12 +100,6 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements
        @Inject
        private PizzaUserWebSessionController userController;
 
-       /**
-        * Login bean (controller)
-        */
-       @Inject
-       private PizzaUserLoginWebSessionController userLoginController;
-
        /**
         * User name
         */
@@ -139,9 +126,6 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements
 
                        // Try to lookup
                        this.userBean = (UserSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
-
-                       // Try to lookup
-                       this.contactBean = (ContactSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/contact!org.mxchange.jcontacts.contact.ContactSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);
@@ -160,7 +144,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements
                } else if (this.getUserName().isEmpty()) {
                        // Is empty
                        throw new IllegalArgumentException("userName is null"); //NOI18N
-               } else if (this.adminHelper.getContact() == null) {
+               } else if (this.beanHelper.getContact() == null) {
                        // No contact instance set, so test required fields: gender, first name and family name
                        if (this.contactController.getGender() == null) {
                                // Throw NPE again
@@ -204,9 +188,9 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements
                Contact contact;
 
                // Is a contact instance in helper set?
-               if (this.adminHelper.getContact() instanceof Contact) {
+               if (this.beanHelper.getContact() instanceof Contact) {
                        // Then use it for contact linking
-                       contact = this.adminHelper.getContact();
+                       contact = this.beanHelper.getContact();
                } else {
                        // Create contact instance
                        contact = this.contactController.createContactInstance();
@@ -223,7 +207,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements
                if (this.userController.isUserNameRegistered(user)) {
                        // User name is already used
                        throw new FaceletException(new UserNameAlreadyRegisteredException(user));
-               } else if ((this.adminHelper.getContact() == null) && (this.contactController.isEmailAddressRegistered(user.getUserContact()))) {
+               } else if ((this.beanHelper.getContact() == null) && (this.contactController.isEmailAddressRegistered(user.getUserContact()))) {
                        // Email address is already used
                        throw new FaceletException(new EmailAddressAlreadyRegisteredException(user));
                } else if ((this.getUserPassword() == null && (this.getUserPasswordRepeat() == null)) || ((this.getUserPassword().isEmpty()) && (this.getUserPasswordRepeat().isEmpty()))) {
@@ -249,12 +233,12 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements
 
                try {
                        // Now, that all is set, call EJB
-                       if (this.adminHelper.getContact() instanceof Contact) {
+                       if (this.beanHelper.getContact() instanceof Contact) {
                                // Link contact with this user
                                updatedUser = this.userBean.linkUser(user);
 
                                // Remove contact instance
-                               this.adminHelper.setContact(null);
+                               this.beanHelper.setContact(null);
                        } else {
                                // Add new contact
                                updatedUser = this.userBean.addUser(user);
@@ -265,7 +249,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements
                }
 
                // Clear helper
-               this.adminHelper.setContact(null);
+               this.beanHelper.setContact(null);
 
                // Fire event
                this.addedUserEvent.fire(new AdminUserAddedEvent(updatedUser));
@@ -313,7 +297,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements
        @Override
        public String editUserData () {
                // Get user instance
-               User user = this.adminHelper.getUser();
+               User user = this.beanHelper.getUser();
 
                // Null password means not setting it
                String encryptedPassword = null;
@@ -321,13 +305,13 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements
                // Check if user instance is in helper and valid
                if (null == user) {
                        // Throw NPE
-                       throw new NullPointerException("adminHelper.user is null"); //NOI18N
+                       throw new NullPointerException("beanHelper.user is null"); //NOI18N
                } else if (user.getUserId() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("adminHelper.user.userId is null"); //NOI18N //NOI18N
+                       throw new NullPointerException("beanHelper.user.userId is null"); //NOI18N //NOI18N
                } else if (user.getUserId() < 1) {
                        // Invalid id
-                       throw new IllegalStateException(MessageFormat.format("adminHelper.user.userId={0} is invalid", user.getUserId())); //NOI18N //NOI18N
+                       throw new IllegalStateException(MessageFormat.format("beanHelper.user.userId={0} is invalid", user.getUserId())); //NOI18N //NOI18N
                } else if (this.getUserName() == null) {
                        // Not all required fields are set
                        throw new NullPointerException("this.userName is null"); //NOI18N
index 799a19b601daa90efed17d3ae78014b6da9ddbd6..5e29f6f67cf6e545e9f591a704032f67cb07415e 100644 (file)
-<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:f="http://java.sun.com/jsf/core"
-       xmlns:h="http://java.sun.com/jsf/html"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
-
-       <h:panelGrid id="user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_CONTACT}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty adminHelper.contact}">
-               <f:facet name="header">
-                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_CONTACT}">
-                               <f:param value="#{adminHelper.contact.contactId}" />
-                       </h:outputFormat>
-               </f:facet>
-
-               <h:column>
-                       <h:outputLabel for="contactId" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ID}" />
-
-                       <h:outputText id="contactId" styleClass="data_field" value="#{adminHelper.contact.contactId}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CREATED}" />
-
-                       <h:outputText id="contactCreated" styleClass="data_field" value="#{adminHelper.contact.contactCreated.time}">
-                               <f:convertDateTime for="contactCreated" type="both" />
-                       </h:outputText>
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_CONTACT_UPDATED}" />
-
-                       <h:outputText id="contactUpdated" styleClass="data_field" value="#{adminHelper.contact.contactUpdated.time}">
-                               <f:convertDateTime for="contactUpdated" type="both" />
-                       </h:outputText>
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" />
-
-                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{adminHelper.contact.isOwnContact()}" />
-               </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[adminHelper.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="#{adminHelper.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="#{adminHelper.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="#{adminHelper.contact.contactFamilyName}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_CONTACT_STREET}" />
-
-                       <h:outputText id="contactStreet" styleClass="data_field" value="#{adminHelper.contact.contactStreet}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />
-
-                       <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{adminHelper.contact.contactHouseNumber}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />
-
-                       <h:outputText id="contactZipCode" styleClass="data_field" value="#{adminHelper.contact.contactZipCode}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CITY}" />
-
-                       <h:outputText id="contactCity" styleClass="data_field" value="#{adminHelper.contact.contactCity}" />
-               </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:#{adminHelper.contact.contactEmailAddress}">
-                               <h:outputText value="#{adminHelper.contact.contactEmailAddress}" />
-                       </h:outputLink>
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />
-
-                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{adminHelper.contact.contactBirthday.time}">
-                               <f:convertDateTime for="contactBirthday" type="date" />
-                       </h:outputText>
-               </h:column>
-       </h:panelGrid>
-</ui:composition>
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<ui:composition\r
+       xmlns="http://www.w3.org/1999/xhtml"\r
+       xmlns:f="http://java.sun.com/jsf/core"\r
+       xmlns:h="http://java.sun.com/jsf/html"\r
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">\r
+\r
+       <h:panelGrid id="user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_CONTACT}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty beanHelper.contact}">\r
+               <f:facet name="header">\r
+                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_CONTACT}">\r
+                               <f:param value="#{beanHelper.contact.contactId}" />\r
+                       </h:outputFormat>\r
+               </f:facet>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactId" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ID}" />\r
+\r
+                       <h:outputText id="contactId" styleClass="data_field" value="#{beanHelper.contact.contactId}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CREATED}" />\r
+\r
+                       <h:outputText id="contactCreated" styleClass="data_field" value="#{beanHelper.contact.contactCreated.time}">\r
+                               <f:convertDateTime for="contactCreated" type="both" />\r
+                       </h:outputText>\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_CONTACT_UPDATED}" />\r
+\r
+                       <h:outputText id="contactUpdated" styleClass="data_field" value="#{beanHelper.contact.contactUpdated.time}">\r
+                               <f:convertDateTime for="contactUpdated" type="both" />\r
+                       </h:outputText>\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" />\r
+\r
+                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{beanHelper.contact.isOwnContact()}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_CONTACT_GENDER}" />\r
+\r
+                       <h:outputText id="contactGender" styleClass="data_field" value="#{msg[beanHelper.contact.contactGender.messageKey]}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_CONTACT_TITLE}" />\r
+\r
+                       <h:outputText id="contactTitle" styleClass="data_field" value="#{beanHelper.contact.contactTitle}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />\r
+\r
+                       <h:outputText id="contactFirstName" styleClass="data_field" value="#{beanHelper.contact.contactFirstName}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />\r
+\r
+                       <h:outputText id="contactFamilyName" styleClass="data_field" value="#{beanHelper.contact.contactFamilyName}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_CONTACT_STREET}" />\r
+\r
+                       <h:outputText id="contactStreet" styleClass="data_field" value="#{beanHelper.contact.contactStreet}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />\r
+\r
+                       <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{beanHelper.contact.contactHouseNumber}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />\r
+\r
+                       <h:outputText id="contactZipCode" styleClass="data_field" value="#{beanHelper.contact.contactZipCode}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CITY}" />\r
+\r
+                       <h:outputText id="contactCity" styleClass="data_field" value="#{beanHelper.contact.contactCity}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />\r
+\r
+                       <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{beanHelper.contact.contactEmailAddress}">\r
+                               <h:outputText value="#{beanHelper.contact.contactEmailAddress}" />\r
+                       </h:outputLink>\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />\r
+\r
+                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{beanHelper.contact.contactBirthday.time}">\r
+                               <f:convertDateTime for="contactBirthday" type="date" />\r
+                       </h:outputText>\r
+               </h:column>\r
+       </h:panelGrid>\r
+</ui:composition>\r
diff --git a/web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl b/web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl
new file mode 100644 (file)
index 0000000..1e7e0a8
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:form id="register_page2_form">
+               <div class="table">
+                       <div class="table_header">
+                               #{msg.GUEST_REGISTRATION_PAGE2_TITLE}
+                       </div>
+
+                       <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
+
+                       <div class="table_footer">
+                               <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                               <h:commandButton styleClass="submit" type="submit" id="finish_registration" value="#{msg.BUTTON_FINISH_REGISTRATION}" action="#{registerController.doFinishRegistration()}" />
+                       </div>
+               </div>
+       </h:form>
+</ui:composition>
index 043babe7dc4f839a4c601aab042db05f0d524445..df3087a7da0998dff0c929fe27b2f3553f2fc62b 100644 (file)
@@ -71,7 +71,7 @@
 
                        <div class="table_footer">
                                <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                               <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_FINISH_REGISTRATION}" action="#{registerController.doFinishRegistration()}" />
+                               <h:commandButton styleClass="submit" type="submit" id="finish_registration_single" value="#{msg.BUTTON_FINISH_REGISTRATION}" action="#{registerController.doFinishRegistration()}" />
                        </div>
                </div>
        </h:form>
index badc92e324eacf9d2a54fae2706acb3cc9768420..a3ae28a065eb3f9ce4b2f9b1750cc8ad3d9c0776 100644 (file)
@@ -9,8 +9,8 @@
        >
 
        <f:metadata>
-               <f:viewParam name="contactId" value="#{adminHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyContactToController()}" />
+               <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
+               <f:viewAction action="#{beanHelper.copyContactToController()}" />
        </f:metadata>
 
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
                </ui:define>
 
                <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty adminHelper.contact}" />
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty beanHelper.contact}" />
 
-                       <h:form id="admin_edit_user" rendered="#{not empty adminHelper.contact}">
+                       <h:form id="admin_edit_user" rendered="#{not empty beanHelper.contact}">
                                <div class="table">
                                        <div class="table_header">
                                                <h:outputFormat value="#{msg.ADMIN_DELETE_CONTACT_TITLE}">
-                                                       <f:param value="#{adminHelper.contact.contactId}" />
+                                                       <f:param value="#{beanHelper.contact.contactId}" />
                                                </h:outputFormat>
                                        </div>
 
@@ -39,7 +39,7 @@
 
                                        <div class="table_footer">
                                                <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                               <h:commandButton styleClass="delete_button" type="submit" id="register" value="#{msg.BUTTON_ADMIN_DELETE_CONTACT}" action="#{adminContactController.deleteContactData()}" />
+                                               <h:commandButton styleClass="delete_button" type="submit" id="delete_contact" value="#{msg.BUTTON_ADMIN_DELETE_CONTACT}" action="#{adminContactController.deleteContactData()}" />
                                        </div>
                                </div>
                        </h:form>
index 0ac502ada92c85d08c8dea858c15c28d2c339129..bd123b611586c6730886f4f54fcdbdcab8ecb6f6 100644 (file)
@@ -9,8 +9,8 @@
        >
 
        <f:metadata>
-               <f:viewParam name="contactId" value="#{adminHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyContactToController()}" />
+               <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
+               <f:viewAction action="#{beanHelper.copyContactToController()}" />
        </f:metadata>
 
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
                </ui:define>
 
                <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty adminHelper.contact}" />
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty beanHelper.contact}" />
 
-                       <h:form id="admin_edit_user" rendered="#{not empty adminHelper.contact}">
+                       <h:form id="admin_edit_user" rendered="#{not empty beanHelper.contact}">
                                <div class="table">
                                        <div class="table_header">
                                                <h:outputFormat value="#{msg.ADMIN_EDIT_CONTACT_TITLE}">
-                                                       <f:param value="#{adminHelper.contact.contactId}" />
+                                                       <f:param value="#{beanHelper.contact.contactId}" />
                                                </h:outputFormat>
                                        </div>
 
@@ -41,7 +41,7 @@
 
                                        <div class="table_footer">
                                                <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                               <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_EDIT_CONTACT}" action="#{adminContactController.editContactData()}" />
+                                               <h:commandButton styleClass="submit" type="submit" id="edit_contact" value="#{msg.BUTTON_ADMIN_EDIT_CONTACT}" action="#{adminContactController.editContactData()}" />
                                        </div>
                                </div>
                        </h:form>
index a139d35f9eff32242abf2ae3766991c918e0f9d1..66ac419941d1ced0553164b27f4e65099e11135c 100644 (file)
@@ -46,7 +46,7 @@
                                <h:column>
                                        <f:facet name="header">#{msg.ADMIN_CONTACT_USAGE}</f:facet>
 
-                                       <h:outputText value="#{msg[adminHelper.getUserCustomerUsageMessageKey(contact)]}" />
+                                       <h:outputText value="#{msg[beanHelper.getUserCustomerUsageMessageKey(contact)]}" />
                                </h:column>
 
                                <h:column>
@@ -72,7 +72,7 @@
 
                                        <div class="table_footer">
                                                <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                               <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_ADD_CONTACT}" action="#{adminContactController.addContact()}" />
+                                               <h:commandButton styleClass="submit" type="submit" id="add_contact" value="#{msg.BUTTON_ADMIN_ADD_CONTACT}" action="#{adminContactController.addContact()}" />
                                        </div>
                                </h:form>
                        </div>
index fccf2ebc89c850323668c2c2916792d5eb3a687b..28131f2002ca3320d458c4b62ffb72a944b0896b 100644 (file)
@@ -1,42 +1,42 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!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="contactId" value="#{adminHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyContactToController()}" />
-       </f:metadata>
-
-       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
-               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_CONTACT}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_ADMIN_SHOW_CONTACT}
-               </ui:define>
-
-               <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty adminHelper.contact}" />
-
-                       <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data.tpl" />
-
-                       <div>
-                               <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_links.tpl">
-                                       <ui:param name="contact" value="#{adminHelper.contact}" />
-                               </ui:include>
-                       </div>
-
-                       <div>
-                               <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_add_show.tpl">
-                                       <ui:param name="cellphoneNumber" value="#{adminHelper.contact.contactCellphoneNumber}" />
-                                       <ui:param name="contact" value="#{adminHelper.contact}" />
-                               </ui:include>
-                       </div>
-               </ui:define>
-       </ui:composition>
-</html>
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html\r
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"\r
+       xmlns="http://www.w3.org/1999/xhtml"\r
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"\r
+       xmlns:h="http://xmlns.jcp.org/jsf/html"\r
+       xmlns:f="http://xmlns.jcp.org/jsf/core"\r
+       >\r
+\r
+       <f:metadata>\r
+               <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />\r
+               <f:viewAction action="#{beanHelper.copyContactToController()}" />\r
+       </f:metadata>\r
+\r
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">\r
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_CONTACT}</ui:define>\r
+\r
+               <ui:define name="content_header">\r
+                       #{msg.CONTENT_TITLE_ADMIN_SHOW_CONTACT}\r
+               </ui:define>\r
+\r
+               <ui:define name="content">\r
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty beanHelper.contact}" />\r
+\r
+                       <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data.tpl" />\r
+\r
+                       <div>\r
+                               <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_links.tpl">\r
+                                       <ui:param name="contact" value="#{beanHelper.contact}" />\r
+                               </ui:include>\r
+                       </div>\r
+\r
+                       <div>\r
+                               <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_add_show.tpl">\r
+                                       <ui:param name="cellphoneNumber" value="#{beanHelper.contact.contactCellphoneNumber}" />\r
+                                       <ui:param name="contact" value="#{beanHelper.contact}" />\r
+                               </ui:include>\r
+                       </div>\r
+               </ui:define>\r
+       </ui:composition>\r
+</html>\r
index 2d1722402f5227fee2059c4b9e0d4aaa1827d471..73737268ab3cd7d923e1d0df58c1d50108423235 100644 (file)
@@ -44,7 +44,7 @@
                                </h:column>
                        </h:dataTable>
 
-                       <h:form id="add_country">
+                       <h:form id="form_add_country">
                                <div class="table_medium">
                                        <div class="table_header">
                                                #{msg.ADMIN_ADD_COUNTRY_TITLE}
@@ -54,7 +54,7 @@
 
                                        <div class="table_footer">
                                                <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                               <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_ADD_COUNTRY}" action="#{adminCountryController.addCountry()}" />
+                                               <h:commandButton styleClass="submit" type="submit" id="add_country" value="#{msg.BUTTON_ADMIN_ADD_COUNTRY}" action="#{adminCountryController.addCountry()}" />
                                        </div>
                                </div>
 
index bf450a76fc0ebf60ecde4f59dc2238e7a003da5f..ebb50f9447b3b7b9dc32d5522d853cdce755777e 100644 (file)
@@ -52,7 +52,7 @@
                                </h:column>
                        </h:dataTable>
 
-                       <h:form id="add_provider">
+                       <h:form id="form_add_mobile_provider">
                                <div class="table_medium">
                                        <div class="table_header">
                                                #{msg.ADMIN_ADD_MOBILE_PROVIDER_TITLE}
@@ -62,7 +62,7 @@
 
                                        <div class="table_footer">
                                                <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                               <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_ADD_MOBILE_PROVIDER}" action="#{adminMobileProviderController.addMobileProvider()}" />
+                                               <h:commandButton styleClass="submit" type="submit" id="add_mobile_provider" value="#{msg.BUTTON_ADMIN_ADD_MOBILE_PROVIDER}" action="#{adminMobileProviderController.addMobileProvider()}" />
                                        </div>
                                </div>
 
index 720c9033efa056f05a38d7bb9ac905c8cd14e2fc..bc0f33aaf6bbdf616f54fdcd76a294a43c73c45d 100644 (file)
@@ -1,29 +1,29 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!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="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyUserToController()}" />
-       </f:metadata>
-
-       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
-               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_DELETE_USER}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_ADMIN_DELETE_USER}
-               </ui:define>
-
-               <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.user}" />
-
-                       Here goes your content.
-               </ui:define>
-       </ui:composition>
-</html>
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html\r
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"\r
+       xmlns="http://www.w3.org/1999/xhtml"\r
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"\r
+       xmlns:h="http://xmlns.jcp.org/jsf/html"\r
+       xmlns:f="http://xmlns.jcp.org/jsf/core"\r
+       >\r
+\r
+       <f:metadata>\r
+               <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />\r
+               <f:viewAction action="#{beanHelper.copyUserToController()}" />\r
+       </f:metadata>\r
+\r
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">\r
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_DELETE_USER}</ui:define>\r
+\r
+               <ui:define name="content_header">\r
+                       #{msg.CONTENT_TITLE_ADMIN_DELETE_USER}\r
+               </ui:define>\r
+\r
+               <ui:define name="content">\r
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" />\r
+\r
+                       Here goes your content.\r
+               </ui:define>\r
+       </ui:composition>\r
+</html>\r
index e20902b900ceadd1861d3938deee103c68c3005b..c244d081292b53907d90eb82a2485e08feebbfbc 100644 (file)
@@ -8,8 +8,8 @@
        >
 
        <f:metadata>
-               <f:viewParam name="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyUserToController()}" />
+               <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
+               <f:viewAction action="#{beanHelper.copyUserToController()}" />
        </f:metadata>
 
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
@@ -20,9 +20,9 @@
                </ui:define>
 
                <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.user}" />
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" />
 
-                       <h:form id="admin_edit_user" rendered="#{not empty adminHelper.user}">
+                       <h:form id="form_edit_user" rendered="#{not empty beanHelper.user}">
                                <div class="table">
                                        <div class="table_header">
                                                #{msg.ADMIN_EDIT_USER_TITLE}
@@ -38,7 +38,7 @@
 
                                        <div class="table_footer">
                                                <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                               <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_EDIT_USER}" action="#{adminUserController.editUserData()}" />
+                                               <h:commandButton styleClass="submit" type="submit" id="edit_user" value="#{msg.BUTTON_ADMIN_EDIT_USER}" action="#{adminUserController.editUserData()}" />
                                        </div>
                                </div>
                        </h:form>
index dd8645a207e415bd7de3c374f6aba23de7f14423..f8280a2b42b4fc59413a12453c6a16ebefede3aa 100644 (file)
@@ -86,7 +86,7 @@
                                                                </div>
 
                                                                <div class="table_right_medium">
-                                                                       <h:selectOneMenu styleClass="select" id="userContact" value="#{adminHelper.contact}" converter="ContactConverter">
+                                                                       <h:selectOneMenu styleClass="select" id="userContact" value="#{beanHelper.contact}" converter="ContactConverter">
                                                                                <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
                                                                                <f:selectItems value="#{userController.selectableContacts()}" var="contact" itemValue="#{contact}" itemLabel="#{contact.contactId}: #{msg[contact.contactGender.messageKey]} #{contact.contactFirstName} #{contact.contactFamilyName}" />
                                                                        </h:selectOneMenu>
 
                                        <div class="table_footer">
                                                <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                               <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_ADD_USER}" action="#{adminUserController.addUser()}" />
+                                               <h:commandButton styleClass="submit" type="submit" id="add_user" value="#{msg.BUTTON_ADMIN_ADD_USER}" action="#{adminUserController.addUser()}" />
                                        </div>
                                </h:form>
                        </div>
index 927dfc9b74ad1f63eee940d94f4ad2454af3fed1..3eb471cb009a01cfb41fd0ab49bd596d68a21ae0 100644 (file)
-<?xml version="1.0" encoding="UTF-8" ?>
-<!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="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyUserToController()}" />
-       </f:metadata>
-
-       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
-               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_USER}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_ADMIN_SHOW_USER}
-               </ui:define>
-
-               <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.user}" />
-
-                       <h:panelGrid id="user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_USER}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty adminHelper.user}">
-                               <f:facet name="header">
-                                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_USER}">
-                                               <f:param value="#{adminHelper.user.userName}" />
-                                               <f:param value="#{adminHelper.user.userId}" />
-                                       </h:outputFormat>
-                               </f:facet>
-
-                               <h:column>
-                                       <h:outputLabel for="userId" styleClass="data_label" value="#{msg.ADMIN_USER_ID}" />
-
-                                       <h:outputText id="userId" styleClass="data_field" value="#{adminHelper.user.userId}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userName" styleClass="data_label" value="#{msg.ADMIN_USER_NAME}" />
-
-                                       <h:outputText id="userName" styleClass="data_field" value="#{adminHelper.user.userName}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userCreated" styleClass="data_label" value="#{msg.ADMIN_USER_CREATED}" />
-
-                                       <h:outputText id="userCreated" styleClass="data_field" value="#{adminHelper.user.userCreated.time}">
-                                               <f:convertDateTime for="userCreated" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userUpdated" styleClass="data_label" value="#{msg.ADMIN_USER_UPDATED}" />
-
-                                       <h:outputText id="userUpdated" styleClass="data_field" value="#{adminHelper.user.userUpdated.time}">
-                                               <f:convertDateTime for="userUpdated" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userAccountStatus" styleClass="data_label" value="#{msg.ADMIN_USER_ACCOUNT_STATUS}" />
-
-                                       <h:outputText id="userAccountStatus" styleClass="data_field #{adminHelper.user.userAccountStatus.styleClass}" value="#{msg[adminHelper.user.userAccountStatus.messageKey]}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userProfileMode" styleClass="data_label" value="#{msg.ADMIN_USER_PROFILE_MODE}" />
-
-                                       <h:outputText id="userProfileMode" styleClass="data_field" value="#{msg[adminHelper.user.userProfileMode.messageKey]}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userLastLocked" styleClass="data_label" value="#{msg.ADMIN_USER_LAST_LOCKED}" />
-
-                                       <h:outputText id="userLastLocked" styleClass="data_field" value="#{adminHelper.user.userLastLocked.time}">
-                                               <f:convertDateTime for="userLastLocked" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="lastLockedReason" styleClass="data_label" value="#{msg.ADMIN_USER_LAST_LOCKED_REASON}" />
-
-                                       <h:outputText id="lastLockedReason" styleClass="data_field" value="#{adminHelper.user.userLastLockedReason}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_USER_CONTACT_CREATED}" />
-
-                                       <h:outputText id="contactCreated" styleClass="data_field" value="#{adminHelper.user.userContact.contactCreated.time}">
-                                               <f:convertDateTime for="contactCreated" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_USER_CONTACT_UPDATED}" />
-
-                                       <h:outputText id="contactUpdated" styleClass="data_field" value="#{adminHelper.user.userContact.contactUpdated.time}">
-                                               <f:convertDateTime for="contactUpdated" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" />
-
-                                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{adminHelper.user.userContact.isOwnContact()}" />
-                               </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[adminHelper.user.userContact.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="#{adminHelper.user.userContact.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="#{adminHelper.user.userContact.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="#{adminHelper.user.userContact.contactFamilyName}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_CONTACT_STREET}" />
-
-                                       <h:outputText id="contactStreet" styleClass="data_field" value="#{adminHelper.user.userContact.contactStreet}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />
-
-                                       <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{adminHelper.user.userContact.contactHouseNumber}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />
-
-                                       <h:outputText id="contactZipCode" styleClass="data_field" value="#{adminHelper.user.userContact.contactZipCode}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CITY}" />
-
-                                       <h:outputText id="contactCity" styleClass="data_field" value="#{adminHelper.user.userContact.contactCity}" />
-                               </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:#{adminHelper.user.userContact.contactEmailAddress}">
-                                               <h:outputText value="#{adminHelper.user.userContact.contactEmailAddress}" />
-                                       </h:outputLink>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />
-
-                                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{adminHelper.user.userContact.contactBirthday.time}">
-                                               <f:convertDateTime for="contactBirthday" type="date" />
-                                       </h:outputText>
-                               </h:column>
-                       </h:panelGrid>
-
-                       <div>
-                               <ui:include src="/WEB-INF/templates/admin/user/admin_user_links.tpl">
-                                       <ui:param name="user" value="#{adminHelper.user}" />
-                               </ui:include>
-                       </div>
-
-                       <div>
-                               <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_add_show.tpl">
-                                       <ui:param name="cellphoneNumber" value="#{adminHelper.user.userContact.contactCellphoneNumber}" />
-                                       <ui:param name="contact" value="#{adminHelper.user.userContact}" />
-                               </ui:include>
-                       </div>
-               </ui:define>
-       </ui:composition>
-</html>
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html\r
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"\r
+       xmlns="http://www.w3.org/1999/xhtml"\r
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"\r
+       xmlns:h="http://xmlns.jcp.org/jsf/html"\r
+       xmlns:f="http://xmlns.jcp.org/jsf/core"\r
+       >\r
+\r
+       <f:metadata>\r
+               <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />\r
+               <f:viewAction action="#{beanHelper.copyUserToController()}" />\r
+       </f:metadata>\r
+\r
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">\r
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_USER}</ui:define>\r
+\r
+               <ui:define name="content_header">\r
+                       #{msg.CONTENT_TITLE_ADMIN_SHOW_USER}\r
+               </ui:define>\r
+\r
+               <ui:define name="content">\r
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" />\r
+\r
+                       <h:panelGrid id="user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_USER}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty beanHelper.user}">\r
+                               <f:facet name="header">\r
+                                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_USER}">\r
+                                               <f:param value="#{beanHelper.user.userName}" />\r
+                                               <f:param value="#{beanHelper.user.userId}" />\r
+                                       </h:outputFormat>\r
+                               </f:facet>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userId" styleClass="data_label" value="#{msg.ADMIN_USER_ID}" />\r
+\r
+                                       <h:outputText id="userId" styleClass="data_field" value="#{beanHelper.user.userId}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userName" styleClass="data_label" value="#{msg.ADMIN_USER_NAME}" />\r
+\r
+                                       <h:outputText id="userName" styleClass="data_field" value="#{beanHelper.user.userName}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userCreated" styleClass="data_label" value="#{msg.ADMIN_USER_CREATED}" />\r
+\r
+                                       <h:outputText id="userCreated" styleClass="data_field" value="#{beanHelper.user.userCreated.time}">\r
+                                               <f:convertDateTime for="userCreated" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userUpdated" styleClass="data_label" value="#{msg.ADMIN_USER_UPDATED}" />\r
+\r
+                                       <h:outputText id="userUpdated" styleClass="data_field" value="#{beanHelper.user.userUpdated.time}">\r
+                                               <f:convertDateTime for="userUpdated" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userAccountStatus" styleClass="data_label" value="#{msg.ADMIN_USER_ACCOUNT_STATUS}" />\r
+\r
+                                       <h:outputText id="userAccountStatus" styleClass="data_field #{beanHelper.user.userAccountStatus.styleClass}" value="#{msg[beanHelper.user.userAccountStatus.messageKey]}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userProfileMode" styleClass="data_label" value="#{msg.ADMIN_USER_PROFILE_MODE}" />\r
+\r
+                                       <h:outputText id="userProfileMode" styleClass="data_field" value="#{msg[beanHelper.user.userProfileMode.messageKey]}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userLastLocked" styleClass="data_label" value="#{msg.ADMIN_USER_LAST_LOCKED}" />\r
+\r
+                                       <h:outputText id="userLastLocked" styleClass="data_field" value="#{beanHelper.user.userLastLocked.time}">\r
+                                               <f:convertDateTime for="userLastLocked" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="lastLockedReason" styleClass="data_label" value="#{msg.ADMIN_USER_LAST_LOCKED_REASON}" />\r
+\r
+                                       <h:outputText id="lastLockedReason" styleClass="data_field" value="#{beanHelper.user.userLastLockedReason}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_USER_CONTACT_CREATED}" />\r
+\r
+                                       <h:outputText id="contactCreated" styleClass="data_field" value="#{beanHelper.user.userContact.contactCreated.time}">\r
+                                               <f:convertDateTime for="contactCreated" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_USER_CONTACT_UPDATED}" />\r
+\r
+                                       <h:outputText id="contactUpdated" styleClass="data_field" value="#{beanHelper.user.userContact.contactUpdated.time}">\r
+                                               <f:convertDateTime for="contactUpdated" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" />\r
+\r
+                                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{beanHelper.user.userContact.isOwnContact()}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_CONTACT_GENDER}" />\r
+\r
+                                       <h:outputText id="contactGender" styleClass="data_field" value="#{msg[beanHelper.user.userContact.contactGender.messageKey]}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_CONTACT_TITLE}" />\r
+\r
+                                       <h:outputText id="contactTitle" styleClass="data_field" value="#{beanHelper.user.userContact.contactTitle}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />\r
+\r
+                                       <h:outputText id="contactFirstName" styleClass="data_field" value="#{beanHelper.user.userContact.contactFirstName}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />\r
+\r
+                                       <h:outputText id="contactFamilyName" styleClass="data_field" value="#{beanHelper.user.userContact.contactFamilyName}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_CONTACT_STREET}" />\r
+\r
+                                       <h:outputText id="contactStreet" styleClass="data_field" value="#{beanHelper.user.userContact.contactStreet}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />\r
+\r
+                                       <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{beanHelper.user.userContact.contactHouseNumber}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />\r
+\r
+                                       <h:outputText id="contactZipCode" styleClass="data_field" value="#{beanHelper.user.userContact.contactZipCode}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CITY}" />\r
+\r
+                                       <h:outputText id="contactCity" styleClass="data_field" value="#{beanHelper.user.userContact.contactCity}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />\r
+\r
+                                       <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{beanHelper.user.userContact.contactEmailAddress}">\r
+                                               <h:outputText value="#{beanHelper.user.userContact.contactEmailAddress}" />\r
+                                       </h:outputLink>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />\r
+\r
+                                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{beanHelper.user.userContact.contactBirthday.time}">\r
+                                               <f:convertDateTime for="contactBirthday" type="date" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+                       </h:panelGrid>\r
+\r
+                       <div>\r
+                               <ui:include src="/WEB-INF/templates/admin/user/admin_user_links.tpl">\r
+                                       <ui:param name="user" value="#{beanHelper.user}" />\r
+                               </ui:include>\r
+                       </div>\r
+\r
+                       <div>\r
+                               <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_add_show.tpl">\r
+                                       <ui:param name="cellphoneNumber" value="#{beanHelper.user.userContact.contactCellphoneNumber}" />\r
+                                       <ui:param name="contact" value="#{beanHelper.user.userContact}" />\r
+                               </ui:include>\r
+                       </div>\r
+               </ui:define>\r
+       </ui:composition>\r
+</html>\r
index 7b33fdaa463d22fbcf5b7ac0420c18115b2b0b74..f5df7f75567d9d59e0ec50093518138f78137ce0 100644 (file)
@@ -1,29 +1,29 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!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="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyUserToController()}" />
-       </f:metadata>
-
-       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
-               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_UNLOCK_USER}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_ADMIN_UNLOCK_USER}
-               </ui:define>
-
-               <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.user}" />
-
-                       Here goes your content.
-               </ui:define>
-       </ui:composition>
-</html>
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html\r
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"\r
+       xmlns="http://www.w3.org/1999/xhtml"\r
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"\r
+       xmlns:h="http://xmlns.jcp.org/jsf/html"\r
+       xmlns:f="http://xmlns.jcp.org/jsf/core"\r
+       >\r
+\r
+       <f:metadata>\r
+               <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />\r
+               <f:viewAction action="#{beanHelper.copyUserToController()}" />\r
+       </f:metadata>\r
+\r
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">\r
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_UNLOCK_USER}</ui:define>\r
+\r
+               <ui:define name="content_header">\r
+                       #{msg.CONTENT_TITLE_ADMIN_UNLOCK_USER}\r
+               </ui:define>\r
+\r
+               <ui:define name="content">\r
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" />\r
+\r
+                       Here goes your content.\r
+               </ui:define>\r
+       </ui:composition>\r
+</html>\r
index a27aae9cf58ddeb9e8ec70f2ac89c7bd6eb4bb62..3beb00ecf6ee5d553fc32cf505082847f792a654 100644 (file)
@@ -17,7 +17,7 @@
 
                <ui:define name="content">
                        <ui:fragment rendered="#{registerController.isResendConfirmationLinkEnabled()}">
-                               <h:form id="resend_link_form">
+                               <h:form id="form_resend_link">
                                        <div class="table">
                                                <div class="table_header">
                                                        <h:outputText value="#{msg.GUEST_RESEND_LINK_TITLE}" />
@@ -49,7 +49,7 @@
 
                                                <div class="table_footer">
                                                        <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                                       <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_RESEND_CONFIRMATION_LINK}" action="#{resendController.doResendLink()}" />
+                                                       <h:commandButton styleClass="submit" type="submit" id="resend_link" value="#{msg.BUTTON_RESEND_CONFIRMATION_LINK}" action="#{resendController.doResendLink()}" />
                                                </div>
                                        </div>
                                </h:form>
diff --git a/web/guest/user/confirm_account.xhtml b/web/guest/user/confirm_account.xhtml
new file mode 100644 (file)
index 0000000..8b6a457
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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="confirmKey" value="#{confirmationLinkController.confirmationKey}" />
+               <f:viewAction onPostback="true" action="#{confirmationLinkController.maybeConfirmUserAccount()}" />
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
+               <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_CONFIRM_ACCOUNT}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_INDEX_CONFIRM_ACCOUNT}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{not empty confirmationLinkController.confirmationKey}">
+                               <ui:fragment rendered="#{not empty beanHelper.user}">
+                                       <div class="table">
+                                               <div class="table_header">
+                                                       <h:outputText value="#{msg.GUEST_CONFIRM_USER_ACCOUNT_DONE_TITLE}" />
+                                               </div>
+
+                                               <div class="table_row">
+                                                       <h:outputFormat value="#{msg.GUEST_USER_CONFIRM_ACCOUNT_DONE}">
+                                                               <f:param value="#{msg[beanHelper.user.userContact.contactGender.messageKey]}" />
+                                                               <f:param value="#{beanHelper.user.userContact.contactFirstName}" />
+                                                               <f:param value="#{beanHelper.user.userContact.contactFamilyName}" />
+                                                       </h:outputFormat>
+                                               </div>
+                                       </div>
+                               </ui:fragment>
+
+                               <ui:fragment rendered="#{empty beanHelper.user}">
+                                       <h:outputText styleClass="errors" value="#{msg.GUEST_CONFIRMATION_LINK_INVALID}" />
+                               </ui:fragment>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{empty confirmationLinkController.confirmationKey}">
+                               <h:outputText styleClass="errors" value="#{msg.GUEST_CONFIRMATION_KEY_NOT_SET}" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>