]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Rewritten a lot:
authorRoland Häder <roland@mxchange.org>
Thu, 12 May 2016 16:18:23 +0000 (18:18 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 13 May 2016 20:33:05 +0000 (22:33 +0200)
- introduced isUserNameRequired() which should make it sure to have registrations with no user name and password. This also includes no login area (not possible)
- the user then will get a random user name with format "userXXXXX" and a random password. So it is still possible that the "feature" login area for users can come back.
- so no "recover password" is possible, too. Therefore such links can be removed from the menu.
- introduced isMultiplePageEnabled() which is used as a "switch" between single-page and multiple-page registration
- introduced isPublicUserProfileEnabled() which is used to disabled/enable the feature "public user profiles" which is sometimes not wanted ...
- introduced isResendConfirmationLinkEnabled() which disabled the corresponding feature
- showing a "choose profile-mode" while no public user profile is enabled makes no sense ... So better "hide" this option.
- introduced general (abstract) controller Base<project-name>Controller which currently holds a method for checking if for a named controller debug mode is enabled
- renamed doRegister() to doFinishRegistration()
- removed no longer used i18n strings (they may have come back by cherry-picking)
- registration page 1/2 should be "basicly finished" now, single is also available
- index page is now jlandingpage-specific as registration page is in index.xhtml (careful, cherry-picking this!)
- added controller method doRegisterMultiPage1()
- added a lot more language strings
- renamed variables
- added context parameters for above new methods
- added needed navigation cases (careful with cherry-picking again)
- sorted imports (minor)
- fixed i18n string (usage)

Signed-off-by: Roland Häder <roland@haeder.net>
Signed-off-by: Roland Häder <roland@mxchange.org>
38 files changed:
nbproject/faces-config.NavData
src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java [new file with mode: 0644]
src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java
src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java
src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java
src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java
src/java/org/mxchange/addressbook/beans/country/AddressbookCountryWebApplicationBean.java
src/java/org/mxchange/addressbook/beans/email_address/AddressbookEmailChangeWebSessionBean.java
src/java/org/mxchange/addressbook/beans/gender/AddressbookGenderWebApplicationBean.java
src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java
src/java/org/mxchange/addressbook/beans/login/AddressbookUserLoginWebSessionBean.java
src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java
src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestBean.java
src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestBean.java
src/java/org/mxchange/addressbook/beans/profile/AddressbookUserProfileWebRequestBean.java
src/java/org/mxchange/addressbook/beans/profilemode/AddressbookProfileModeWebApplicationBean.java
src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionBean.java
src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionController.java
src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionBean.java
src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java
src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java
src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/faces-config.xml
web/WEB-INF/templates/contact/form_contact_data.tpl
web/WEB-INF/templates/guest/guest_menu.tpl
web/WEB-INF/templates/guest/guest_privacy_terms.tpl
web/WEB-INF/templates/guest/user/guest_registration_form.tpl
web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl
web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl [new file with mode: 0644]
web/WEB-INF/web.xml
web/guest/user/login.xhtml
web/guest/user/lost_passwd.xhtml
web/guest/user/register.xhtml
web/guest/user/register_page2.xhtml [new file with mode: 0644]
web/guest/user/resend_link.xhtml
web/guest/user/user_profile.xhtml

index 298bfc50a82fc997caae5cb3a3a53656c24b7570..676c3694e59ee5a1ded489423fa20aab6aba4eb9 100644 (file)
@@ -1,6 +1,66 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scene Scope="Project" version="2">
     <Scope Scope="Faces Configuration Only"/>
-    <Scope Scope="Project"/>
+    <Scope Scope="Project">
+        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="1900" y="300" zoom="true"/>
+        <Node id="admin/contact/admin_contact_show.xhtml" x="2150" y="450" zoom="true"/>
+        <Node id="privacy.xhtml" x="2400" y="300" zoom="true"/>
+        <Node id="guest/user/show_addressbook.xhtml" x="150" y="300" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="150" y="750" zoom="true"/>
+        <Node id="admin/user/admin_user_show.xhtml" x="1400" y="150" zoom="true"/>
+        <Node id="admin/index.xhtml" x="900" y="600" zoom="true"/>
+        <Node id="user/login_own_addressbooks.xhtml" x="150" y="1500" zoom="true"/>
+        <Node id="user/login_user_data_saved.xhtml" x="900" y="300" zoom="true"/>
+        <Node id="user/index.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="admin/admin_logout.xhtml" x="1900" y="150" zoom="true"/>
+        <Node id="user/login_data_saved.xhtml" x="650" y="600" zoom="true"/>
+        <Node id="admin/user/admin_user_unlock.xhtml" x="400" y="150" zoom="true"/>
+        <Node id="user/login_other_addressbooks.xhtml" x="1650" y="450" zoom="true"/>
+        <Node id="user/login_start_sharing_addressbook.xhtml" x="900" y="150" zoom="true"/>
+        <Node id="guest/user/user_list.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="index.xhtml" x="1400" y="750" zoom="true"/>
+        <Node id="user/login_edit_user_data.xhtml" x="2400" y="150" zoom="true"/>
+        <Node id="*" x="400" y="600" zoom="true"/>
+        <Node id="admin/admin_category_delete.xhtml" x="900" y="750" zoom="true"/>
+        <Node id="user/login_index.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="400" y="900" zoom="true"/>
+        <Node id="guest/user/lost_passwd.xhtml" x="1650" y="150" zoom="true"/>
+        <Node id="guest/user/register_done.xhtml" x="150" y="450" zoom="true"/>
+        <Node id="guest/user/show_addressbook_entries.xhtml" x="150" y="900" zoom="true"/>
+        <Node id="admin/country/admin_country_list.xhtml" x="1400" y="600" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="900" y="900" zoom="true"/>
+        <Node id="guest/user/login_error.xhtml" x="1400" y="450" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="1150" y="150" zoom="true"/>
+        <Node id="user/login_change_password.xhtml" x="1150" y="600" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="guest/user/user_profile.xhtml" x="400" y="300" zoom="true"/>
+        <Node id="basket.xhtml" x="150" y="1350" zoom="true"/>
+        <Node id="user/login_list_sharing_addressbooks.xhtml" x="150" y="150" zoom="true"/>
+        <Node id="exception.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="admin/user/admin_user_delete.xhtml" x="1400" y="300" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="1900" y="450" zoom="true"/>
+        <Node id="guest/user/register_page2.xhtml" x="2150" y="150" zoom="true"/>
+        <Node id="admin/user/admin_user_edit.xhtml" x="400" y="1200" zoom="true"/>
+        <Node id="terms.xhtml" x="900" y="1050" zoom="true"/>
+        <Node id="admin/contact/admin_contact_list.xhtml" x="1650" y="300" zoom="true"/>
+        <Node id="admin/contact/admin_contact_edit.xhtml" x="1150" y="900" zoom="true"/>
+        <Node id="admin/user/admin_user_list.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="admin/country/admin_country_delete.xhtml" x="650" y="150" zoom="true"/>
+        <Node id="user/login_change_personal_data.xhtml" x="650" y="900" zoom="true"/>
+        <Node id="logout.xhtml" x="400" y="1050" zoom="true"/>
+        <Node id="admin/country/admin_country_edit.xhtml" x="1150" y="750" zoom="true"/>
+        <Node id="guest/user/resend_link.xhtml" x="1650" y="600" zoom="true"/>
+        <Node id="user/login_add_addressbook.xhtml" x="400" y="1350" zoom="true"/>
+        <Node id="user/login_contact_data_saved.xhtml" x="650" y="450" zoom="true"/>
+        <Node id="admin/contact/admin_contact_delete.xhtml" x="2150" y="300" zoom="true"/>
+        <Node id="imprint.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="user/login_shared_addressbooks.xhtml" x="650" y="1200" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="1900" y="600" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="2650" y="150" zoom="true"/>
+        <Node id="guest/user/login.xhtml" x="150" y="1050" zoom="true"/>
+        <Node id="admin/admin_product_delete.xhtml" x="650" y="1050" zoom="true"/>
+        <Node id="guest/user/register.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="user/login_change_email_address.xhtml" x="150" y="1200" zoom="true"/>
+    </Scope>
     <Scope Scope="All Faces Configurations"/>
 </Scene>
diff --git a/src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java b/src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java
new file mode 100644 (file)
index 0000000..bee8b0a
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * 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.addressbook.beans;
+
+import java.io.Serializable;
+import javax.faces.context.FacesContext;
+
+/**
+ * A general controller
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public abstract class BaseAddressbookController implements Serializable {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 50_837_597_127_567_140L;
+
+       /**
+        * Checks whether debug mode is enabled for given controller
+        * <p>
+        * @param controllerName Name of controller
+        * <p>
+        * @return Whether debug mode is enabled
+        */
+       protected boolean isDebugModeEnabled (final String controllerName) {
+               // Parameters should be valid
+               if (null == controllerName) {
+                       // Throw NPE
+                       throw new NullPointerException("controllerName is null"); //NOI18N
+               } else if (controllerName.isEmpty()) {
+                       // Is empty
+                       throw new IllegalArgumentException("controllerName is empty"); //NOI18N
+               }
+
+               // Try to get context parameter
+               String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter(String.format("is_debug_%s_enabled", controllerName)); //NOI18N
+
+               // Is it set and true?
+               boolean isEnabled = ((contextParameter instanceof String) && (contextParameter.equals("true"))); //NOI18N
+
+               // Return it
+               return isEnabled;
+       }
+
+}
index 3a5347e0606e0fba9e0a4834dcff5dc8d370e10e..52c3458384e0868d1e8338271977ff4eb08c92a0 100644 (file)
@@ -35,6 +35,7 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController;
 import org.mxchange.addressbook.model.addressbook.AddressbookSessionBeanRemote;
 import org.mxchange.jaddressbookcore.events.addressbook.AddressbookLoadedEvent;
@@ -54,7 +55,7 @@ import org.mxchange.jusercore.model.user.User;
  */
 @Named ("addressbookController")
 @SessionScoped
-public class AddressbookWebSessionBean implements AddressbookWebSessionController {
+public class AddressbookWebSessionBean extends BaseAddressbookController implements AddressbookWebSessionController {
 
        /**
         * Map for count of user's shared addresses
index 33870172ecdd098c55d42c95b3c127db3a5fd2c2..7b7b9bc47bdb06cffe4277d2e30d633da5428102 100644 (file)
@@ -29,6 +29,7 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.addressbook.beans.helper.AddressbookAdminWebRequestController;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.contact.ContactSessionBeanRemote;
@@ -56,7 +57,7 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
  */
 @Named ("adminContactController")
 @RequestScoped
-public class AddressbookAdminContactWebRequestBean implements AddressbookAdminContactWebRequestController {
+public class AddressbookAdminContactWebRequestBean extends BaseAddressbookController implements AddressbookAdminContactWebRequestController {
 
        /**
         * Serial number
index 89c9c3a6241dd70ff72bc3c76229d46bcbc54d18..17c5695b2a19ad153a6693423dfee95acb2c621a 100644 (file)
@@ -31,6 +31,7 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.contact.ContactSessionBeanRemote;
@@ -60,7 +61,7 @@ import org.mxchange.jusercore.exceptions.UserPasswordMismatchException;
  */
 @Named ("contactController")
 @SessionScoped
-public class AddressbookContactWebSessionBean implements AddressbookContactWebSessionController {
+public class AddressbookContactWebSessionBean extends BaseAddressbookController implements AddressbookContactWebSessionController {
 
        /**
         * Serial number
@@ -172,12 +173,6 @@ public class AddressbookContactWebSessionBean implements AddressbookContactWebSe
         */
        private boolean isLandLineUnlinked;
 
-       /**
-        * Login bean (controller)
-        */
-       @Inject
-       private AddressbookUserLoginWebSessionController loginController;
-
        /**
         * Phone number area code
         */
@@ -198,6 +193,12 @@ public class AddressbookContactWebSessionBean implements AddressbookContactWebSe
         */
        private String street;
 
+       /**
+        * Login bean (controller)
+        */
+       @Inject
+       private AddressbookUserLoginWebSessionController userLoginController;
+
        /**
         * ZIP code
         */
@@ -493,19 +494,19 @@ public class AddressbookContactWebSessionBean implements AddressbookContactWebSe
        @Override
        public String doChangePersonalContactData () {
                // This method shall only be called if the user is logged-in
-               if (!this.loginController.isUserLoggedIn()) {
+               if (!this.userLoginController.isUserLoggedIn()) {
                        // Not logged-in
                        throw new IllegalStateException("User is not logged-in"); //NOI18N
                } else if (!this.isRequiredChangePersonalDataSet()) {
                        // Not all required fields are set
                        throw new FaceletException("Not all required fields are set."); //NOI18N
-               } else if (!this.loginController.ifCurrentPasswordMatches()) {
+               } else if (!this.userLoginController.ifCurrentPasswordMatches()) {
                        // Password not matching
-                       throw new FaceletException(new UserPasswordMismatchException(this.loginController.getLoggedInUser()));
+                       throw new FaceletException(new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()));
                }
 
                // Get contact instance
-               Contact contact = this.loginController.getLoggedInUser().getUserContact();
+               Contact contact = this.userLoginController.getLoggedInUser().getUserContact();
 
                // It should be there, so run some tests on it
                assert (contact instanceof Contact) : "Instance loginController.loggedInUser.userContact is null"; //NOI18N
index 1cb88004b69b9afab95e6319575f6dd6a7d2ac2b..a46fee02a5c15d697a00f87f30ea3e62734df775 100644 (file)
@@ -28,6 +28,7 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.jcountry.data.Country;
 import org.mxchange.jcountry.data.CountryData;
 import org.mxchange.jcountry.data.CountrySingletonBeanRemote;
@@ -42,7 +43,7 @@ import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException;
  */
 @Named ("adminCountryController")
 @RequestScoped
-public class AddressbookAdminCountryWebRequestBean implements AddressbookAdminCountryWebRequestController {
+public class AddressbookAdminCountryWebRequestBean extends BaseAddressbookController implements AddressbookAdminCountryWebRequestController {
 
        /**
         * Serial number
index ada0bb616b9568ab3ad6b1f60d11412bb2f4050d..d88455f917a52c16c3d2fb8591711fb995ddeabd 100644 (file)
@@ -27,6 +27,7 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.jcountry.data.Country;
 import org.mxchange.jcountry.data.CountrySingletonBeanRemote;
 import org.mxchange.jcountry.events.AdminAddedCountryEvent;
@@ -38,7 +39,7 @@ import org.mxchange.jcountry.events.AdminAddedCountryEvent;
  */
 @Named ("countryController")
 @ApplicationScoped
-public class AddressbookCountryWebApplicationBean implements AddressbookCountryWebApplicationController {
+public class AddressbookCountryWebApplicationBean extends BaseAddressbookController implements AddressbookCountryWebApplicationController {
 
        /**
         * Serial number
index 084fe843884cdb8f7f1229c9478f297f24497698..4337db00382e65b4c8f36a4ef9a5dc21c3ac6f37 100644 (file)
@@ -26,6 +26,7 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jusercore.exceptions.UserPasswordMismatchException;
@@ -41,7 +42,7 @@ import org.mxchange.jusercore.model.user.User;
  */
 @Named ("emailChangeController")
 @SessionScoped
-public class AddressbookEmailChangeWebSessionBean implements AddressbookEmailChangeWebSessionController {
+public class AddressbookEmailChangeWebSessionBean extends BaseAddressbookController implements AddressbookEmailChangeWebSessionController {
 
        /**
         * Serial number
index 0cf0d1c6c68ed530a2ebd53613490667ac2dc540..c2371e88c56c29dddb18a3ead10552fd3aaba3e9 100644 (file)
@@ -19,6 +19,7 @@ package org.mxchange.addressbook.beans.gender;
 import java.util.List;
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Named;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.jcontacts.contact.gender.Gender;
 import org.mxchange.jcontacts.contact.gender.GenderUtils;
 
@@ -29,7 +30,7 @@ import org.mxchange.jcontacts.contact.gender.GenderUtils;
  */
 @Named ("genderController")
 @ApplicationScoped
-public class AddressbookGenderWebApplicationBean implements AddressbookGenderWebApplicationController {
+public class AddressbookGenderWebApplicationBean extends BaseAddressbookController implements AddressbookGenderWebApplicationController {
 
        /**
         * Serial number
index 9bf7f1b37d5acfa72a6651a6babe7a5129ae011b..c1f029b1ffcfd88ea3d74c1a25b265232c41b5aa 100644 (file)
@@ -21,7 +21,7 @@ import javax.annotation.PostConstruct;
 import javax.faces.bean.SessionScoped;
 import javax.faces.context.FacesContext;
 import javax.inject.Named;
-import org.mxchange.jcoreee.database.BaseDatabaseBean;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 
 /**
  * A session bean for handling localization/internationalization changes. This
@@ -33,7 +33,7 @@ import org.mxchange.jcoreee.database.BaseDatabaseBean;
  */
 @Named ("localizationController")
 @SessionScoped
-public class AddressbookLocalizationSessionBean extends BaseDatabaseBean implements AddressbookLocalizationSessionController {
+public class AddressbookLocalizationSessionBean extends BaseAddressbookController implements AddressbookLocalizationSessionController {
 
        /**
         * Serial number
index 38b4ee8e42c16a1d16216f411a348baa02e3cdb2..6f38d3fb6bbd246e6ba27b817af97f88b3b8f3e4 100644 (file)
@@ -26,6 +26,8 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
+import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController;
 import org.mxchange.jusercore.container.login.LoginContainer;
 import org.mxchange.jusercore.container.login.UserLoginContainer;
 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
@@ -39,7 +41,6 @@ import org.mxchange.jusercore.model.user.User;
 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.addressbook.beans.user.AddressbookUserWebSessionController;
 
 /**
  * A web bean for user registration
@@ -48,7 +49,7 @@ import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController;
  */
 @Named ("loginController")
 @SessionScoped
-public class AddressbookUserLoginWebSessionBean implements AddressbookUserLoginWebSessionController {
+public class AddressbookUserLoginWebSessionBean extends BaseAddressbookController implements AddressbookUserLoginWebSessionController {
 
        /**
         * Serial number
index b6d511b934c08dc701520f7f2b7b495e307d8596..3ba0d243d96364431b86a5a936f6c0664fe74106 100644 (file)
@@ -28,6 +28,7 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.jcountry.data.Country;
 import org.mxchange.jphone.events.AdminAddedMobileProviderEvent;
 import org.mxchange.jphone.events.AdminMobileProviderAddedEvent;
@@ -43,7 +44,7 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
  */
 @Named ("adminMobileProviderController")
 @RequestScoped
-public class AddressbookAdminMobileProviderWebRequestBean implements AddressbookAdminMobileProviderWebRequestController {
+public class AddressbookAdminMobileProviderWebRequestBean extends BaseAddressbookController implements AddressbookAdminMobileProviderWebRequestController {
 
        /**
         * Serial number
index 408accfd4109658e4374c624d150a90fd4c23b5f..be138c76d1d81d4cc8c3b7e25991a86a35cbe994 100644 (file)
@@ -27,6 +27,7 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.jphone.events.AdminAddedMobileProviderEvent;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProviderSingletonBeanRemote;
@@ -38,7 +39,7 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProviderSingletonBe
  */
 @Named ("mobileProviderController")
 @SessionScoped
-public class AddressbookMobileProviderWebRequestBean implements AddressbookMobileProviderWebRequestController {
+public class AddressbookMobileProviderWebRequestBean extends BaseAddressbookController implements AddressbookMobileProviderWebRequestController {
 
        /**
         * Serial number
index 57c40db5addc7223dc24e783477da7b96e19a59a..503db8e2ef3343c129898280ee4c1b5d73418f44 100644 (file)
@@ -25,6 +25,7 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote;
 import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
@@ -38,7 +39,7 @@ import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
  */
 @Named ("adminContactPhoneController")
 @RequestScoped
-public class AddressbookAdminContactPhoneWebRequestBean implements AddressbookAdminContactPhoneWebRequestController {
+public class AddressbookAdminContactPhoneWebRequestBean extends BaseAddressbookController implements AddressbookAdminContactPhoneWebRequestController {
 
        /**
         * Serial number
index abedbba9e0ede5726cf15cabb0f17e10487dd02a..45040fc671f5c13ec29485ea6b357173dc465dcb 100644 (file)
@@ -21,6 +21,7 @@ import javax.enterprise.context.RequestScoped;
 import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
 import javax.inject.Named;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController;
 import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
@@ -34,7 +35,7 @@ import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
  */
 @Named (value = "profileController")
 @RequestScoped
-public class AddressbookUserProfileWebRequestBean implements AddressbookUserProfileWebRequestController {
+public class AddressbookUserProfileWebRequestBean extends BaseAddressbookController implements AddressbookUserProfileWebRequestController {
 
        /**
         * Serial number
@@ -56,24 +57,24 @@ public class AddressbookUserProfileWebRequestBean implements AddressbookUserProf
        @Override
        public boolean isProfileLinkVisibleById (final Long userId) {
                // Init user instance
-               User u = null;
+               User user = null;
 
                try {
                        // Try to get it
-                       u = this.userController.lookupUserById(userId);
+                       user = this.userController.lookupUserById(userId);
                } catch (final UserNotFoundException ex) {
                        // Throw again
                        throw new FaceletException(ex);
                }
 
                // Is it null?
-               if (null == u) {
+               if (null == user) {
                        // Not found, not visible.
                        return false;
                }
 
                // Ask other method
-               return this.isProfileLinkVisibleByUser(u);
+               return this.isProfileLinkVisibleByUser(user);
        }
 
        @Override
index e39bb52d82f753d36decc42c6946aa499e8ee066..6b7a95ce916285bee160eb75c67e793a10c5e7c6 100644 (file)
@@ -18,6 +18,7 @@ package org.mxchange.addressbook.beans.profilemode;
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Named;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
 
 /**
@@ -27,7 +28,7 @@ import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
  */
 @Named ("profileMode")
 @ApplicationScoped
-public class AddressbookProfileModeWebApplicationBean implements AddressbookProfileModeWebApplicationController {
+public class AddressbookProfileModeWebApplicationBean extends BaseAddressbookController implements AddressbookProfileModeWebApplicationController {
 
        /**
         * Serial number
index 062bec042512269086996d012bf6eda6e1833e80..6f6d2e15ffb0949a3bd065e07c3cbdabb0657065 100644 (file)
@@ -20,12 +20,14 @@ import java.text.MessageFormat;
 import javax.enterprise.context.SessionScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.inject.Any;
+import javax.faces.context.FacesContext;
 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.addressbook.beans.BaseAddressbookController;
 import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController;
 import org.mxchange.addressbook.beans.user.AddressbookAdminUserWebRequestController;
 import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController;
@@ -46,7 +48,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus;
  */
 @Named ("registerController")
 @SessionScoped
-public class AddressbookUserRegisterWebSessionBean implements AddressbookUserRegisterWebSessionController {
+public class AddressbookUserRegisterWebSessionBean extends BaseAddressbookController implements AddressbookUserRegisterWebSessionController {
 
        /**
         * Serial number
@@ -100,14 +102,14 @@ public class AddressbookUserRegisterWebSessionBean implements AddressbookUserReg
        }
 
        @Override
-       public String doRegister () {
+       public String doFinishRegistration () {
                // Get user instance
                User user = this.userController.createUserInstance();
 
                // Is the user already used?
                if (null == user) {
                        // user must be set
-                       throw new NullPointerException("user is null"); //NOI18N
+                       throw new NullPointerException("user is null after createUserInstance() was called"); //NOI18N
                } else if (!this.userController.isRequiredPersonalDataSet()) {
                        // Not all required fields are set
                        throw new FaceletException("Not all required fields are set."); //NOI18N
@@ -131,8 +133,14 @@ public class AddressbookUserRegisterWebSessionBean implements AddressbookUserReg
                // Set it here
                user.setUserEncryptedPassword(encryptedPassword);
 
-               // For debugging/programming only:
-               user.setUserAccountStatus(UserAccountStatus.CONFIRMED);
+               // Is developer mode?
+               if (this.isDebugModeEnabled("register")) { //NOI18N
+                       // For debugging/programming only:
+                       user.setUserAccountStatus(UserAccountStatus.CONFIRMED);
+               } else {
+                       // No debugging of this part
+                       user.setUserAccountStatus(UserAccountStatus.UNCONFIRMED);
+               }
 
                try {
                        // Call bean
@@ -152,4 +160,34 @@ public class AddressbookUserRegisterWebSessionBean implements AddressbookUserReg
                }
        }
 
+       @Override
+       public String doRegisterMultiPage1 () {
+               // Now only redirect to next page as the JSF does it
+               return "register_page2"; //NOI18N
+       }
+
+       @Override
+       public boolean isMultiplePageEnabled () {
+               // Get context parameter
+               String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter("is_multi_register_page"); //NOI18N
+
+               // Is it set?
+               boolean isEnabled = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N
+
+               // Return value
+               return isEnabled;
+       }
+
+       @Override
+       public boolean isResendConfirmationLinkEnabled () {
+               // Get context parameter
+               String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter("is_resend_confirm_link_enabled"); //NOI18N
+
+               // Is it set?
+               boolean isEnabled = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N
+
+               // Return value
+               return isEnabled;
+       }
+
 }
index eccd06dd1c6dc37944c626d288afa0ddf226f16f..d076d5ae856ff1343366eab38216d4e618027c55 100644 (file)
@@ -31,5 +31,29 @@ public interface AddressbookUserRegisterWebSessionController extends Serializabl
         * <p>
         * @return Redirection target
         */
-       String doRegister ();
+       String doFinishRegistration ();
+
+       /**
+        * Handles registration request send from first page. The (maybe) entered
+        * user name and email address is not used and that privacy and T&C are
+        * accepted.
+        * <p>
+        * @return Redirect
+        */
+       String doRegisterMultiPage1 ();
+
+       /**
+        * Checks wether multi-page or single-page registration is active
+        * <p>
+        * @return Whether multi (true) or single page (false) is active
+        */
+       boolean isMultiplePageEnabled ();
+
+       /**
+        * Checks whether the "resend confirmation link" feature is enabled
+        * <p>
+        * @return Whether "resend confirmation link" is enabled
+        */
+       boolean isResendConfirmationLinkEnabled ();
+
 }
index e0706b73c31ef92d21e6840645ce76d3bb7f3392..75a3782934b7b634f4d047f8f262e47ec1b9fc1d 100644 (file)
@@ -31,6 +31,7 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController;
 import org.mxchange.addressbook.model.shared.SharedAddressbooksSessionBeanRemote;
 import org.mxchange.jaddressbookcore.events.sharing.AddressbookSharingEvent;
@@ -50,7 +51,7 @@ import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
  */
 @Named (value = "shareController")
 @SessionScoped
-public class AddressbookSharesWebSessionBean implements AddressbookSharesWebSessionController {
+public class AddressbookSharesWebSessionBean extends BaseAddressbookController implements AddressbookSharesWebSessionController {
 
        /**
         * Serial number
index ed1958c5e9103d946c1a4c0a3ab1ab4b792e8cf7..5273cf87a9ea2541f590df40021f17026b2a3d1a 100644 (file)
@@ -29,6 +29,7 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController;
 import org.mxchange.addressbook.beans.helper.AddressbookAdminWebRequestController;
 import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController;
@@ -57,7 +58,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus;
  */
 @Named ("adminUserController")
 @RequestScoped
-public class AddressbookAdminUserWebRequestBean implements AddressbookAdminUserWebRequestController {
+public class AddressbookAdminUserWebRequestBean extends BaseAddressbookController implements AddressbookAdminUserWebRequestController {
 
        /**
         * Serial number
index 7f369991c294c670f65401c799419a68579c2956..d65e27a1b8591a6d96c63190496c4f74770eba75 100644 (file)
@@ -26,14 +26,17 @@ import javax.enterprise.context.SessionScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.event.Observes;
 import javax.enterprise.inject.Any;
+import javax.faces.context.FacesContext;
 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.addressbook.beans.BaseAddressbookController;
 import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController;
 import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController;
+import org.mxchange.addressbook.beans.register.AddressbookUserRegisterWebSessionController;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.contact.ContactSessionBeanRemote;
 import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
@@ -48,6 +51,7 @@ import org.mxchange.jusercore.exceptions.UserPasswordMismatchException;
 import org.mxchange.jusercore.model.user.LoginUser;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.UserSessionBeanRemote;
+import org.mxchange.jusercore.model.user.UserUtils;
 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
 
 /**
@@ -57,7 +61,7 @@ import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
  */
 @Named ("userController")
 @SessionScoped
-public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionController {
+public class AddressbookUserWebSessionBean extends BaseAddressbookController implements AddressbookUserWebSessionController {
 
        /**
         * Serial number
@@ -81,6 +85,12 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC
        @Inject
        private AddressbookUserLoginWebSessionController loginController;
 
+       /**
+        * Registration controller
+        */
+       @Inject
+       private AddressbookUserRegisterWebSessionController registerController;
+
        /**
         * A list of all selectable contacts
         */
@@ -170,7 +180,7 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC
                if (null == event) {
                        // Throw NPE
                        throw new NullPointerException("event is null"); //NOI18N
-               } else if (event.getAddedContact()== null) {
+               } else if (event.getAddedContact() == null) {
                        // Throw again ...
                        throw new NullPointerException("event.addedContact is null"); //NOI18N
                } else if (event.getAddedContact().getContactId() == null) {
@@ -372,7 +382,24 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC
                // Create new user instance
                User localUser = new LoginUser();
 
-               // Update all data ...
+               // Is user name required?
+               if (!this.isUserNameRequired()) {
+                       // Generate pseudo-random user name
+                       String randomName = this.userBean.generateRandomUserName();
+
+                       // Set it and inivisible profile
+                       this.setUserName(randomName);
+                       this.setUserProfileMode(ProfileMode.INVISIBLE);
+
+                       // Generate random password
+                       String randomPassword = UserUtils.createRandomPassword(AddressbookUserWebSessionController.MINIMUM_PASSWORD_LENGTH);
+
+                       // Set random password
+                       this.setUserPassword(randomPassword);
+                       this.setUserPasswordRepeat(randomPassword);
+               }
+
+               // Set user name and mode
                localUser.setUserName(this.getUserName());
                localUser.setUserProfileMode(this.getUserProfileMode());
 
@@ -607,6 +634,24 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC
                return isFound;
        }
 
+       @Override
+       public boolean isPublicUserProfileEnabled () {
+               // Get context parameter
+               String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter("is_public_profile_enabled"); //NOI18N
+
+               // Is it set?
+               boolean isPublicUserProfileEnabled = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N
+
+               // This requires user names being enabled, too.
+               if ((isPublicUserProfileEnabled) && (!this.isUserNameRequired())) {
+                       // Not valid state, users must be able to modify their profile, especially when it is public
+                       throw new IllegalStateException("Public user profiles are enabled but user name requirement is disabled, this is not possible."); //NOI18N
+               }
+
+               // Return value
+               return isPublicUserProfileEnabled;
+       }
+
        @Override
        public boolean isRequiredChangePersonalDataSet () {
                return ((this.getUserProfileMode() != null) &&
@@ -616,11 +661,17 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC
 
        @Override
        public boolean isRequiredPersonalDataSet () {
-               return ((this.getUserName() != null) &&
-                               (this.getUserProfileMode() != null) &&
-                               (this.contactController.isRequiredPersonalDataSet()) &&
-                               (this.getUserPassword() != null) &&
-                               (this.getUserPasswordRepeat() != null));
+               if (this.registerController.isMultiplePageEnabled()) {
+                       // Multiple registration page
+                       return this.contactController.isRequiredPersonalDataSet();
+               } else {
+                       // Single registration page
+                       return (((this.getUserName() != null) || (!this.isUserNameRequired())) &&
+                                       (this.getUserProfileMode() != null) &&
+                                       (this.contactController.isRequiredPersonalDataSet()) &&
+                                       (this.getUserPassword() != null) &&
+                                       (this.getUserPasswordRepeat() != null));
+               }
        }
 
        @Override
@@ -638,6 +689,18 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC
                return ((this.userNameList instanceof List) && (this.userNameList.contains(user.getUserName())));
        }
 
+       @Override
+       public boolean isUserNameRequired () {
+               // Get context parameter
+               String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter("is_user_name_required"); //NOI18N
+
+               // Is it set?
+               boolean isUserNameRequired = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N
+
+               // Return value
+               return isUserNameRequired;
+       }
+
        @Override
        public boolean isVisibleUserFound () {
                return ((this.visibleUserList instanceof List) && (this.visibleUserList.size() > 0));
index c5eb1ade23deb4268b92ec834cfafbc71ba32e75..915038959c2a3a5ae865f04bfb0ad379c4f7a75c 100644 (file)
@@ -41,6 +41,14 @@ public interface AddressbookUserWebSessionController extends Serializable {
         */
        public static final Integer MINIMUM_PASSWORD_LENGTH = 5;
 
+       /**
+        * Observes events being fired when an administrator has added a new
+        * contact.
+        * <p>
+        * @param event Event being fired
+        */
+       void afterAdminAddedContact (final AdminAddedContactEvent event);
+
        /**
         * Event observer for newly added users by adminstrator
         * <p>
@@ -106,14 +114,6 @@ public interface AddressbookUserWebSessionController extends Serializable {
         */
        boolean isContactFound (final Contact contact);
 
-       /**
-        * Observes events being fired when an administrator has added a new
-        * contact.
-        * <p>
-        * @param event Event being fired
-        */
-       void afterAdminAddedContact (final AdminAddedContactEvent event);
-
        /**
         * Checks whether a public user account is registered. This means that at
         * least one user profile has its flag "public user profile" enabled.
@@ -271,4 +271,20 @@ public interface AddressbookUserWebSessionController extends Serializable {
         */
        String doChangePersonalData ();
 
+       /**
+        * Checks whether this application requires a user name to be entered.
+        * Otherwise a random name like "userXXXXX" is generated
+        * <p>
+        * @return Whether this application requires a user name
+        */
+       boolean isUserNameRequired ();
+
+       /**
+        * Checks wether public user profiles are enabled. This requires that user
+        * names are also enabled.
+        * <p>
+        * @return Whether public user profiles are enabled
+        */
+       boolean isPublicUserProfileEnabled ();
+
 }
index 3e7f5ef2d031c3f45132f2477fa3050c3464bb26..be47a1f2f0d143781332cdb5f69d752034431431 100644 (file)
@@ -527,3 +527,13 @@ LINK_GUEST_PRIVACY_STATEMENTS=Datenschutzbestimmungen
 ADMIN_ADD_OR_ENTER_CONTACT_DATA=... oder geben Sie die Kontaktdaten des Recruiters ein:
 ADMIN_PERSONAL_DATA_EMAIL_ADDRESS=Email-Adresse:
 ERROR_CONTACT_ID_NOT_FOUND=Fehler: Kontaktdaten nicht gefunden.
+GUEST_REGISTRATION_PAGE1_TITLE=Anmeldeseite 1
+GUEST_REGISTRATION_PAGE2_TITLE=Anmeldeseite 2
+BUTTON_CONTINUE_REGISTER_PAGE2=Weiter zur Anmeldeseite 2
+ERROR_GUEST_REGISTER_MULTIPLE_PAGE_NOT_ENABLED=Fehler: Mehrfach-Seite f\u00fcr Anmeldung nicht aktiv, bitte Link nicht aufrufen.
+PAGE_TITLE_USER_REGISTER_PAGE2=Anmeldeseite 2
+CONTENT_TITLE_USER_REGISTER_PAGE2=Anmeldeseite 2:
+ERROR_GUEST_USER_LOGIN_DEACTIVATED=Fehler: Der Benutzerbereich wurde administrativ deaktiviert (keine Benutzernamen bei Anmeldung).
+ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED=Fehler: Wiederherstellen des Passwortes wurde administrativ deaktiviert.
+ERROR_GUEST_USER_RESEND_CONFIRMATION_DEACTIVATED=Fehler: Erneutes Aussenden des Best\u00e4tigungslinked ist administrativ deaktiviert.
+ERROR_GUEST_USER_PROFILE_DEACTIVATED=Fehler: \u00d6ffentliche Benutzerprofile sind administrativ deaktiviert.
index 2f16e3301ca350551e84e487633c12f34ad965b8..23ff4181c5c75656926cece9264911c791f3b3d8 100644 (file)
@@ -491,3 +491,13 @@ LINK_GUEST_PRIVACY_STATEMENTS=privacy statements
 ADMIN_ADD_OR_ENTER_CONTACT_DATA=... or enter the recruiter's contact data:
 ADMIN_PERSONAL_DATA_EMAIL_ADDRESS=Email address:
 ERROR_CONTACT_ID_NOT_FOUND=Error: contact data not found
+GUEST_REGISTRATION_PAGE1_TITLE=Registration page 1
+GUEST_REGISTRATION_PAGE2_TITLE=Registration page 2
+BUTTON_CONTINUE_REGISTER_PAGE2=Continue to registration page 2
+ERROR_GUEST_REGISTER_MULTIPLE_PAGE_NOT_ENABLED=Error: Multiple registration page not active, please don't call this page.
+PAGE_TITLE_USER_REGISTER_PAGE2=Register page 2
+CONTENT_TITLE_USER_REGISTER_PAGE2=Register page 2:
+ERROR_GUEST_USER_LOGIN_DEACTIVATED=Error: User area is deactivated by administrators, no user name while registration.
+ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED=Error: password recovery is deactivated by administrators.
+ERROR_GUEST_USER_RESEND_CONFIRMATION_DEACTIVATED=Error: Resending confirmation link is deactivated by administrators.
+ERROR_GUEST_USER_PROFILE_DEACTIVATED=Error: Public user profiles are deactivated by administrators.
index 08df41e1f8a52aee4123e89be332c8bbf27d92ad..b0ee8803c78bcfe4d044e4279208018b34261f1c 100644 (file)
                        <from-outcome>register_done</from-outcome>
                        <to-view-id>/guest/user/register_done.xhtml</to-view-id>
                </navigation-case>
+               <navigation-case>
+                       <from-outcome>register_page2</from-outcome>
+                       <to-view-id>/guest/user/register_page2.xhtml</to-view-id>
+               </navigation-case>
        </navigation-rule>
        <navigation-rule>
                <from-view-id>/admin/admin_logout.xhtml</from-view-id>
index dd60568754f6b5b16144cd2d5361b584bc0e9b34..55d2234c5aa601718b89bdd488970a93e7458f0e 100644 (file)
                </fieldset>
        </div>
 
-       <div class="para">
-               <fieldset id="user_profile">
-                       <legend title="#{msg.USER_PROFILE_LEGEND_TITLE}">#{msg.USER_PROFILE_LEGEND}</legend>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="profileMode" value="#{msg.USER_PROFILE_MODE}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <ui:include src="/WEB-INF/templates/generic/profile_mode_selection_box.tpl" />
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="para notice">
-                                       <ul>
-                                               <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_INVISIBLE}</li>
-                                               <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_MEMBERS}</li>
-                                               <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_PUBLIC}</li>
-                                       </ul>
-                               </div>
-                       </div>
-               </fieldset>
-       </div>
+       <ui:fragment rendered="#{userController.isPublicUserProfileEnabled()}">
+               <div class="para">
+                       <fieldset id="user_profile">
+                               <legend title="#{msg.USER_PROFILE_LEGEND_TITLE}">#{msg.USER_PROFILE_LEGEND}</legend>
+
+                               <div class="table_row">
+                                       <div class="table_left">
+                                               <h:outputLabel for="profileMode" value="#{msg.USER_PROFILE_MODE}" />
+                                       </div>
+
+                                       <div class="table_right">
+                                               <ui:include src="/WEB-INF/templates/generic/profile_mode_selection_box.tpl" />
+                                       </div>
+
+                                       <div class="clear"></div>
+                               </div>
+
+                               <div class="table_row">
+                                       <div class="para notice">
+                                               <ul>
+                                                       <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_INVISIBLE}</li>
+                                                       <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_MEMBERS}</li>
+                                                       <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_PUBLIC}</li>
+                                               </ul>
+                                       </div>
+                               </div>
+                       </fieldset>
+               </div>
+       </ui:fragment>
 </ui:composition>
index c92679cdef2ac52299fbcad925dfcdbfd139e708..be83b4a19e751be777d41985c8d0368977050e43 100644 (file)
                        </div>
 
                        <ul>
-                               <li>
-                                       <h:link title="#{msg.LINK_GUEST_LOGIN_TITLE}" outcome="user_login" value="#{msg.LINK_GUEST_LOGIN}" />
-                               </li>
+                               <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                       <li>
+                                               <h:link title="#{msg.LINK_GUEST_LOGIN_TITLE}" outcome="user_login" value="#{msg.LINK_GUEST_LOGIN}" />
+                                       </li>
+                               </ui:fragment>
 
                                <li>
                                        <h:link title="#{msg.LINK_GUEST_REGISTER_TITLE}" outcome="user_register" value="#{msg.LINK_GUEST_REGISTER}" />
                                </li>
 
-                               <li>
-                                       <h:link title="#{msg.LINK_GUEST_PASSWORD_TITLE}" outcome="user_lost_passwd" value="#{msg.LINK_GUEST_PASSWORD}" />
-                               </li>
-
-                               <li>
-                                       <h:link title="#{msg.LINK_GUEST_RESEND_LINK_TITLE}" outcome="user_resend_link" value="#{msg.LINK_GUEST_RESEND_LINK}" />
-                               </li>
+                               <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                       <li>
+                                               <h:link title="#{msg.LINK_GUEST_PASSWORD_TITLE}" outcome="user_lost_passwd" value="#{msg.LINK_GUEST_PASSWORD}" />
+                                       </li>
+                               </ui:fragment>
+
+                               <ui:fragment rendered="#{registerController.isResendConfirmationLinkEnabled()}">
+                                       <li>
+                                               <h:link title="#{msg.LINK_GUEST_RESEND_LINK_TITLE}" outcome="user_resend_link" value="#{msg.LINK_GUEST_RESEND_LINK}" />
+                                       </li>
+                               </ui:fragment>
                        </ul>
                </div>
        </div>
index e4b3f3981a8233d151305ea4ac12d5396828c37b..385dfc850f6529318e74558eb1a05c6f2b83c943 100644 (file)
@@ -34,7 +34,7 @@
 
                                <div class="table_right75">
                                        #{msg.GUEST_AGREE_READ_TERMS_CONDITIONS_1}
-                                       <h:link outcome="terms" target="_blank" value="#{msg.TERMS_CONDITIONS}" />
+                                       <h:link outcome="terms" target="_blank" value="#{msg.LINK_GUEST_TERMS_CONDITIONS}" />
                                        #{msg.GUEST_AGREE_READ_TERMS_CONDITIONS_2}
                                </div>
 
index c95a7639d70077ef6834b5382f5cbd0a0fe24d1d..c9020630f08cafcae878d2aae5c843f868edaf5a 100644 (file)
@@ -5,11 +5,10 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
-
-       <h:form id="register_form">
+       <h:form id="register_page2_form">
                <div class="table">
                        <div class="table_header">
-                               #{msg.GUEST_REGISTRATION_TITLE}
+                               #{msg.GUEST_REGISTRATION_PAGE2_TITLE}
                        </div>
 
                        <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
@@ -90,7 +89,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.doRegister()}" />
+                               <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_FINISH_REGISTRATION}" action="#{registerController.doFinishRegistration()}" />
                        </div>
                </div>
        </h:form>
index 55c2ebddbcf300b6eef94bb33d747771062cbd0d..a1c7223d913add429e17bb712700531da80afb93 100644 (file)
@@ -6,29 +6,29 @@
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
 
-       <h:form id="register_form">
+       <h:form id="register_page1_form">
                <div class="table">
                        <div class="table_header">
-                               #{msg.GUEST_REGISTRATION_TITLE}
+                               #{msg.GUEST_REGISTRATION_PAGE1_TITLE}
                        </div>
 
-                       <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
-
                        <div class="para">
                                <fieldset id="login_data">
                                        <legend title="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND_TITLE}">#{msg.GUEST_REGISTRATION_EMAIL_LEGEND}</legend>
 
-                                       <div class="table_row">
-                                               <div class="table_left">
-                                                       <h:outputLabel for="userName" value="#{msg.GUEST_REGISTRATION_ENTER_USER_NAME}" />
-                                               </div>
+                                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="userName" value="#{msg.GUEST_REGISTRATION_ENTER_USER_NAME}" />
+                                                       </div>
 
-                                               <div class="table_right">
-                                                       <h:inputText styleClass="input" id="userName" size="20" maxlength="255" value="#{userController.userName}" required="true" />
-                                               </div>
+                                                       <div class="table_right">
+                                                               <h:inputText styleClass="input" id="userName" size="20" maxlength="255" value="#{userController.userName}" required="true" />
+                                                       </div>
 
-                                               <div class="clear"></div>
-                                       </div>
+                                                       <div class="clear"></div>
+                                               </div>
+                                       </ui:fragment>
 
                                        <div class="table_row">
                                                <div class="table_left">
                                                <div class="clear"></div>
                                        </div>
 
-                                       <div class="para"></div>
+                                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                               <div class="para"></div>
 
-                                       <div class="table_row">
-                                               <div class="table_left">
-                                                       <h:outputLabel for="userPassword" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD}" />
-                                               </div>
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="userPassword" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD}" />
+                                                       </div>
 
-                                               <div class="table_right">
-                                                       <h:inputSecret styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userController.userPassword}" required="true" />
+                                                       <div class="table_right">
+                                                               <h:inputSecret styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userController.userPassword}" required="true" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
                                                </div>
 
-                                               <div class="clear"></div>
-                                       </div>
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="userPasswordRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD_REPEAT}" />
+                                                       </div>
 
-                                       <div class="table_row">
-                                               <div class="table_left">
-                                                       <h:outputLabel for="userPasswordRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD_REPEAT}" />
-                                               </div>
+                                                       <div class="table_right">
+                                                               <h:inputSecret styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userController.userPasswordRepeat}" required="true" />
+                                                       </div>
 
-                                               <div class="table_right">
-                                                       <h:inputSecret styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userController.userPasswordRepeat}" required="true" />
+                                                       <div class="clear"></div>
                                                </div>
 
-                                               <div class="clear"></div>
-                                       </div>
-
-                                       <div class="para notice">
-                                               #{msg.GUEST_REGISTRATION_USER_NAME_NOTICE}
-                                       </div>
+                                               <div class="para notice">
+                                                       #{msg.GUEST_REGISTRATION_USER_NAME_NOTICE}
+                                               </div>
+                                       </ui:fragment>
                                </fieldset>
                        </div>
 
@@ -90,7 +92,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.doRegister()}" />
+                               <h:commandButton styleClass="submit" type="submit" id="continueRegisterPage1" value="#{msg.BUTTON_CONTINUE_REGISTER_PAGE2}" action="#{registerController.doRegisterMultiPage1()}" />
                        </div>
                </div>
        </h:form>
diff --git a/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl b/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl
new file mode 100644 (file)
index 0000000..d4e1e9d
--- /dev/null
@@ -0,0 +1,100 @@
+<?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_single_form">
+               <div class="table">
+                       <div class="table_header">
+                               #{msg.GUEST_REGISTRATION_TITLE}
+                       </div>
+
+                       <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
+
+                       <div class="para">
+                               <fieldset id="login_data">
+                                       <legend title="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND_TITLE}">#{msg.GUEST_REGISTRATION_EMAIL_LEGEND}</legend>
+
+                                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="userName" value="#{msg.GUEST_REGISTRATION_ENTER_USER_NAME}" />
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <h:inputText styleClass="input" id="userName" size="20" maxlength="255" value="#{userController.userName}" required="true" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
+                                               </div>
+                                       </ui:fragment>
+
+                                       <div class="table_row">
+                                               <div class="table_left">
+                                                       <h:outputLabel for="emailAddress" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL}" />
+                                               </div>
+
+                                               <div class="table_right">
+                                                       <h:inputText styleClass="input" id="emailAddress" size="20" maxlength="255" value="#{contactController.emailAddress}" required="true" />
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <div class="table_row">
+                                               <div class="table_left">
+                                                       <h:outputLabel for="emailAddressRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL_REPEAT}" />
+                                               </div>
+
+                                               <div class="table_right">
+                                                       <h:inputText styleClass="input" id="emailAddressRepeat" size="20" maxlength="255" value="#{contactController.emailAddressRepeat}" required="true" />
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                               <div class="para"></div>
+
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="userPassword" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD}" />
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <h:inputSecret styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userController.userPassword}" required="true" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
+                                               </div>
+
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="userPasswordRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD_REPEAT}" />
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <h:inputSecret styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userController.userPasswordRepeat}" required="true" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
+                                               </div>
+
+                                               <div class="para notice">
+                                                       #{msg.GUEST_REGISTRATION_USER_NAME_NOTICE}
+                                               </div>
+                                       </ui:fragment>
+                               </fieldset>
+                       </div>
+
+                       <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" />
+
+                       <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()}" />
+                       </div>
+               </div>
+       </h:form>
+</ui:composition>
index 0122fc6e65b7f98afffef2b210baaa8c3cf5e723..07d90b9fc50053a111955887f28daa1a0b3a7f58 100644 (file)
@@ -3,8 +3,29 @@
     <description>An online address book application to share private and business memebers between all members. It is also possible that the user's profile can be made visible to outside.</description>
     <display-name>Addressbook Application v1.0</display-name>
     <context-param>
-        <param-name>javax.faces.PROJECT_STAGE</param-name>
-        <param-value>Development</param-value>
+        <description>Whether debug mode is for registration controller enabled.</description>
+        <param-name>is_debug_register_enabled</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether the multi-page registration page or a single registration page is active</description>
+        <param-name>is_multi_register_page</param-name>
+        <param-value>true</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether a user name is required on registration</description>
+        <param-name>is_user_name_required</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether the public user profile is enabled.</description>
+        <param-name>is_public_profile_enabled</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether "resend confirmation link" ius enabled.</description>
+        <param-name>is_resend_confirm_link_enabled</param-name>
+        <param-value>false</param-value>
     </context-param>
     <servlet>
         <servlet-name>Faces Servlet</servlet-name>
index e52d27906ff338ae9ee0b8d9d76fee2227b2e0fa..6025cb04ec740ee68a28a23a4d297a906a7e2bc3 100644 (file)
@@ -3,10 +3,10 @@
 <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"
-         >
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
 
        <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl" id="user_login">
                <ui:define name="guest_title">#{msg.PAGE_TITLE_USER_LOGIN}</ui:define>
                </ui:define>
 
                <ui:define name="content">
-                       <div class="para">
-                               <!-- TODO Internatialize this somehow //-->
-                               Noch kein Benutzerkonto? Einfach <h:link id="user_register" outcome="user_register" title="Als Benutzer anmelden">hier</h:link> anmelden.
-                       </div>
+                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                               <div class="para">
+                                       <!-- TODO Internatialize this somehow //-->
+                                       Noch kein Benutzerkonto? Einfach <h:link id="user_register" outcome="user_register" title="Als Benutzer anmelden">hier</h:link> anmelden.
+                               </div>
 
-                       <div class="para">
-                               <ui:include src="/WEB-INF/templates/guest/user/guest_login_form.tpl" />
-                       </div>
+                               <div class="para">
+                                       <ui:include src="/WEB-INF/templates/guest/user/guest_login_form.tpl" />
+                               </div>
 
-                       <div class="para">
-                               <h:link id="user_lost_password" outcome="user_lost_passwd" title="#{msg.LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD}" value="#{msg.LINK_GUEST_LOGIN_LOST_PASSWORD}" />
-                       </div>
+                               <div class="para">
+                                       <h:link id="user_lost_password" outcome="user_lost_passwd" title="#{msg.LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD}" value="#{msg.LINK_GUEST_LOGIN_LOST_PASSWORD}" />
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not userController.isUserNameRequired()}">
+                               <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_LOGIN_DEACTIVATED}" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index 103e070c322b8f85f855e70daf1af2472a37685e..376a421f02b800069019f153a27d506fed09d014 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <div class="para" id="user_lost_password_content">
-                               <h:form id="lost_password_form">
-                                       <div class="table">
-                                               <div class="table_header">
-                                                       #{msg.GUEST_LOST_PASSWORD_TITLE}
-                                               </div>
+                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                               <div class="para" id="user_lost_password_content">
+                                       <h:form id="lost_password_form">
+                                               <div class="table">
+                                                       <div class="table_header">
+                                                               #{msg.GUEST_LOST_PASSWORD_TITLE}
+                                                       </div>
 
-                                               <fieldset id="login_data">
-                                                       <legend title="#{msg.GUEST_LOST_PASSWORD_LEGEND_TITLE}">#{msg.GUEST_LOST_PASSWORD_LEGEND}</legend>
+                                                       <fieldset id="login_data">
+                                                               <legend title="#{msg.GUEST_LOST_PASSWORD_LEGEND_TITLE}">#{msg.GUEST_LOST_PASSWORD_LEGEND}</legend>
 
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="id" value="#{msg.ENTER_USER_NAME}" />
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="id" value="#{msg.ENTER_USER_NAME}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputText styleClass="input" id="id" size="10" maxlength="20" value="#{passwordRecoveryController.userId}" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
                                                                </div>
 
-                                                               <div class="table_right">
-                                                                       <h:inputText styleClass="input" id="id" size="10" maxlength="20" value="#{passwordRecoveryController.userId}" />
+                                                               <div class="table_header">
+                                                                       #{msg.GUEST_LOST_PASSWORD_NUMBER_OR_EMAIL}
                                                                </div>
 
-                                                               <div class="clear"></div>
-                                                       </div>
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="email" value="#{msg.ENTER_EMAIL_ADDRESS}" />
+                                                                       </div>
 
-                                                       <div class="table_header">
-                                                               #{msg.GUEST_LOST_PASSWORD_NUMBER_OR_EMAIL}
-                                                       </div>
+                                                                       <div class="table_right">
+                                                                               <h:inputText styleClass="input" id="email" size="20" maxlength="255" value="#{passwordRecoveryController.emailAddress}" />
+                                                                       </div>
 
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="email" value="#{msg.ENTER_EMAIL_ADDRESS}" />
+                                                                       <div class="clear"></div>
                                                                </div>
 
-                                                               <div class="table_right">
-                                                                       <h:inputText styleClass="input" id="email" size="20" maxlength="255" value="#{passwordRecoveryController.emailAddress}" />
-                                                               </div>
+                                                       </fieldset>
 
-                                                               <div class="clear"></div>
+                                                       <div class="table_footer">
+                                                               <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                               <h:commandButton styleClass="submit" type="submit" value="#{msg.BUTTON_CONTINUE_STEP_2}" action="#{passwordRecoveryController.doLostPasswordStep2()}" />
                                                        </div>
-
-                                               </fieldset>
-
-                                               <div class="table_footer">
-                                                       <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                                       <h:commandButton styleClass="submit" type="submit" value="#{msg.BUTTON_CONTINUE_STEP_2}" action="#{passwordRecoveryController.doLostPasswordStep2()}" />
                                                </div>
-                                       </div>
-                               </h:form>
-                       </div>
+                                       </h:form>
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not userController.isUserNameRequired()}">
+                               <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED}" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index ab0f910484e5148e4601aefb37a4dc9b663d52d9..e8546fec4bb687815a20b90c71e61b250770fba6 100644 (file)
@@ -3,10 +3,10 @@
 <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"
-         >
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
 
        <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
                <ui:define name="guest_title">#{msg.PAGE_TITLE_USER_REGISTER}</ui:define>
                </ui:define>
 
                <ui:define name="content">
-                       <div class="para">
-                               #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1}
-                               <h:link outcome="user_login" value="#{msg.CLICK_HERE}" />
-                               #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_2}
-                       </div>
+                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                               <div class="para">
+                                       #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1}
+                                       <h:link outcome="user_login" value="#{msg.CLICK_HERE}" />
+                                       #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_2}
+                               </div>
+                       </ui:fragment>
 
                        <div class="registration_form">
-                               <ui:include src="/WEB-INF/templates/guest/user/guest_registration_form.tpl" />
+                               <ui:fragment rendered="#{registerController.isMultiplePageEnabled()}">
+                                       <ui:include src="/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl" />
+                               </ui:fragment>
+
+                               <ui:fragment rendered="#{not registerController.isMultiplePageEnabled()}">
+                                       <ui:include src="/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl" />
+                               </ui:fragment>
                        </div>
                </ui:define>
        </ui:composition>
diff --git a/web/guest/user/register_page2.xhtml b/web/guest/user/register_page2.xhtml
new file mode 100644 (file)
index 0000000..04b7ccd
--- /dev/null
@@ -0,0 +1,38 @@
+<?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"
+       >
+
+       <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
+               <ui:define name="guest_title">#{msg.PAGE_TITLE_USER_REGISTER_PAGE2}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_USER_REGISTER_PAGE2}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{registerController.isMultiplePageEnabled()}">
+                               <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                       <div class="para">
+                                               #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1}
+                                               <h:link outcome="user_login" value="#{msg.CLICK_HERE}" />
+                                               #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_2}
+                                       </div>
+                               </ui:fragment>
+
+                               <div class="registration_form">
+                                       <ui:include src="/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl" />
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not registerController.isMultiplePageEnabled()}">
+                               <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_REGISTER_MULTIPLE_PAGE_NOT_ENABLED}" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
index 89da7508a44c89c9272cbf237cc5ffa2ed79570c..4c619697e619cc149701338460e07b7b201c2237 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       Here goes your content.
+                       <ui:fragment rendered="#{registerController.isResendConfirmationLinkEnabled()}">
+                               Here goes your content.
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not registerController.isResendConfirmationLinkEnabled()}">
+                               <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED}" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index ef63b6f7e55e7c47532972733b1b8d729a0cc6b8..4873345223f54327703e00dd9315a3ea91963e76 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{userController.isUserIdEmpty()}">
-                               <ui:include src="/WEB-INF/templates/user/userid_error.tpl" />
-                       </ui:fragment>
+                       <ui:fragment rendered="#{userController.isPublicUserProfileEnabled()}">
+                               <ui:fragment rendered="#{userController.isUserIdEmpty()}">
+                                       <ui:include src="/WEB-INF/templates/user/userid_error.tpl" />
+                               </ui:fragment>
+
+                               <ui:fragment rendered="#{not profileController.isProfileLinkVisibleById(userController.userId)}">
+                                       #{msg.ERROR_PROFILE_NOT_VISIBLE}
+                               </ui:fragment>
 
-                       <ui:fragment rendered="#{not profileController.isProfileLinkVisibleById(userController.userId)}">
-                               #{msg.ERROR_PROFILE_NOT_VISIBLE}
+                               <ui:fragment rendered="#{profileController.isProfileLinkVisibleById(userController.userId)}">
+                                       <div align="center">
+                                               <h:panelGrid styleClass="table" headerClass="table_header" footerClass="table_footer">
+                                                       <f:facet name="header">
+                                                               #{msg.PUBLIC_USER_PROFILE}
+                                                       </f:facet>
+                                               </h:panelGrid>
+                                       </div>
+                               </ui:fragment>
                        </ui:fragment>
 
-                       <ui:fragment rendered="#{profileController.isProfileLinkVisibleById(userController.userId)}">
-                               <div align="center">
-                                       <h:panelGrid styleClass="table" headerClass="table_header" footerClass="table_footer">
-                                               <f:facet name="header">
-                                                       #{msg.PUBLIC_USER_PROFILE}
-                                               </f:facet>
-                                       </h:panelGrid>
-                               </div>
+                       <ui:fragment rendered="#{not userController.isPublicUserProfileEnabled()}">
+                               <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_PROFILE_DEACTIVATED}" />
                        </ui:fragment>
                </ui:define>
        </ui:composition>