]> git.mxchange.org Git - addressbook-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Mon, 17 Jul 2017 15:23:56 +0000 (17:23 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 22 Jul 2017 22:25:05 +0000 (00:25 +0200)
- renamed feature 'user_name_required' to
  'user_login_requires_user_name' to make it more clear

Signed-off-by: Roland Häder <roland@mxchange.org>
19 files changed:
src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestHelperBean.java
src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java
src/java/org/mxchange/addressbook/beans/user/register/AddressbookUserRegisterWebSessionBean.java
src/java/org/mxchange/addressbook/converter/fax/AddressbookFaxNumberConverter.java
src/java/org/mxchange/addressbook/converter/landline/AddressbookLandLineNumberConverter.java
web/WEB-INF/templates/admin/user/admin_show_user_data.tpl
web/WEB-INF/templates/admin/user/admin_show_user_data_mini.tpl
web/WEB-INF/templates/guest/guest_menu.tpl
web/WEB-INF/templates/guest/user/guest_login_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
web/WEB-INF/web.xml
web/admin/user/admin_user_activity_log.xhtml
web/admin/user/admin_user_export.xhtml
web/admin/user/admin_user_list.xhtml
web/guest/user/user_login.xhtml
web/guest/user/user_lost_password.xhtml
web/guest/user/user_register.xhtml
web/guest/user/user_register_page2.xhtml

index 8ef166bd405f8294b2bc9a95b48045139e24fa39..8df045702d4245e4d9f7c414d2bccfc839a1b50d 100644 (file)
@@ -1,5 +1,9 @@
 /*
+<<<<<<< HEAD:src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestHelperBean.java
  * Copyright (C) 2016, 2017 Roland Häder
+=======
+ * Copyright (C) 2016, 2017 Roland Häder GmbH
+>>>>>>> c26888296... Please cherry-pick::src/java/org/mxchange/jfinancials/beans/helper/FinancialsWebRequestHelperBean.java
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index c6e62a0367519d54fdb55df76c46db89668be25e..73052b013c5815445caa649af25689f2f89a548e 100644 (file)
@@ -804,7 +804,7 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
        @Override
        public boolean isUserNameRequired () {
                // Get context parameter
-               String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter("is_user_name_required"); //NOI18N
+               String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter("is_user_login_require_user_name"); //NOI18N
 
                // Is it set?
                boolean isRequired = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N
index 5ff71fb14745287089537730c6372fe405ad47e4..f63c07bf8b56094fad19b3aceabe64ee56aeca89 100644 (file)
@@ -124,7 +124,7 @@ public class AddressbookUserRegisterWebSessionBean extends BaseAddressbookContro
                } else if (!this.userController.isRequiredPersonalDataSet()) {
                        // Not all required fields are set
                        throw new FaceletException("Not all required fields are set."); //NOI18N
-               } else if ((this.featureController.isFeatureEnabled("user_name_required")) && (this.userController.isUserNameRegistered(user))) { //NOI18N
+               } else if ((this.featureController.isFeatureEnabled("user_login_require_user_name")) && (this.userController.isUserNameRegistered(user))) { //NOI18N
                        // Is multi-page enabled?
                        if (this.featureController.isFeatureEnabled("user_register_multiple_page")) { //NOI18N
                                // User name is already used, should not happen here
@@ -231,7 +231,7 @@ public class AddressbookUserRegisterWebSessionBean extends BaseAddressbookContro
                if (null == user) {
                        // user must be set
                        throw new NullPointerException("user is null after createUserInstance() was called"); //NOI18N
-               } else if ((this.featureController.isFeatureEnabled("user_name_required")) && (this.userController.isUserNameRegistered(user))) { //NOI18N
+               } else if ((this.featureController.isFeatureEnabled("user_login_require_user_name")) && (this.userController.isUserNameRegistered(user))) { //NOI18N
                        // User name is already used, so clear it
                        this.userController.setUserName(null);
                        this.showFacesMessage("form_register_page1:userName", "ERROR_USER_NAME_ALREADY_USED"); //NOI18N
index afce7036f6510df11b75d43721369b2440d04bd9..2cfc2d46168c96fc6b748ef25e72465b6e9efd36 100644 (file)
-/*\r
- * Copyright (C) 2017 Roland Häder\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU Affero General Public License as\r
- * published by the Free Software Foundation, either version 3 of the\r
- * License, or (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU Affero General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Affero General Public License\r
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-package org.mxchange.addressbook.converter.fax;\r
-\r
-import java.text.MessageFormat;\r
-import javax.faces.component.UIComponent;\r
-import javax.faces.context.FacesContext;\r
-import javax.faces.convert.Converter;\r
-import javax.faces.convert.ConverterException;\r
-import javax.faces.convert.FacesConverter;\r
-import javax.naming.Context;\r
-import javax.naming.InitialContext;\r
-import javax.naming.NamingException;\r
-import org.mxchange.jcoreeelogger.beans.local.logger.Log;\r
-import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;\r
-import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException;\r
-import org.mxchange.jphone.phonenumbers.DialableNumber;\r
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;\r
-import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote;\r
-\r
-/**\r
- * Converter for fax id <-> valid fax number instance\r
- * <p>\r
- * @author Roland Häder<roland@mxchange.org>\r
- */\r
-@FacesConverter (value = "FaxNumberConverter")\r
-public class AddressbookFaxNumberConverter implements Converter {\r
-\r
-       /**\r
-        * Logger instance\r
-        */\r
-       @Log\r
-       private LoggerBeanLocal loggerBeanLocal;\r
-\r
-       /**\r
-        * Phone EJB\r
-        */\r
-       private PhoneSessionBeanRemote phoneBean;\r
-\r
-       /**\r
-        * Initialization of this converter\r
-        */\r
-       public AddressbookFaxNumberConverter () {\r
-               // Try to get it\r
-               try {\r
-                       // Get initial context\r
-                       Context context = new InitialContext();\r
-\r
-                       // Lookup logger\r
-                       this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N\r
-\r
-                       // ... and user controller\r
-                       this.phoneBean = (PhoneSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote"); //NOI18N\r
-               } catch (final NamingException ex) {\r
-                       // Continue to throw it\r
-                       throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N\r
-               }\r
-       }\r
-\r
-       @Override\r
-       public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {\r
-               // Log message\r
-               this.loggerBeanLocal.logTrace(MessageFormat.format("{0}.getAsObject: context={1},component={2},submittedValue={3} - CALLED!", this.getClass().getSimpleName(), context, component, submittedValue)); //NOI18N\r
-\r
-               // Is the value null or empty?\r
-               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {\r
-                       // Warning message\r
-                       this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N\r
-\r
-                       // Return null\r
-                       return null;\r
-               }\r
-\r
-               // Init instance\r
-               DialableFaxNumber faxNumber = null;\r
-\r
-               try {\r
-                       // Try to parse the value as long\r
-                       Long faxNumberId = Long.valueOf(submittedValue);\r
-\r
-                       // Log message\r
-                       this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject: faxNumberId={1}", this.getClass().getSimpleName(), faxNumberId)); //NOI18N\r
-\r
-                       // Try to get mobile instance from it\r
-                       faxNumber = this.phoneBean.findFaxNumberById(faxNumberId);\r
-               } catch (final NumberFormatException ex) {\r
-                       // Throw again\r
-                       throw new ConverterException(ex);\r
-               } catch (final PhoneEntityNotFoundException ex) {\r
-                       // Debug message\r
-                       this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject(): Exception: {1} - Returning null ...", this.getClass().getSimpleName(), ex)); //NOI18N\r
-               }\r
-\r
-               // Log message\r
-               this.loggerBeanLocal.logTrace(MessageFormat.format("{0}.getAsObject: faxNumber={1} - EXIT!", this.getClass().getSimpleName(), faxNumber)); //NOI18N\r
-\r
-               // Return it\r
-               return faxNumber;\r
-       }\r
-\r
-       @Override\r
-       public String getAsString (final FacesContext context, final UIComponent component, final Object value) {\r
-               // Is the object null?\r
-               if ((null == value) || ((String.valueOf(value)).isEmpty())) {\r
-                       // Is null\r
-                       return ""; //NOI18N\r
-               } else if (!(value instanceof DialableNumber)) {\r
-                       // Not same interface\r
-                       throw new IllegalArgumentException(MessageFormat.format("value {0} does not implement DialableNumber.", value)); //NOI18N\r
-               }\r
-\r
-               // Return category id\r
-               return String.valueOf(((DialableNumber) value).getPhoneId());\r
-       }\r
-\r
-}\r
+/*
+ * Copyright (C) 2017 Roland Häder
+ *
+ * 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.converter.fax;
+
+import java.text.MessageFormat;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.convert.FacesConverter;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jcoreeelogger.beans.local.logger.Log;
+import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
+import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException;
+import org.mxchange.jphone.phonenumbers.DialableNumber;
+import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote;
+
+/**
+ * Converter for fax id <-> valid fax number instance
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@FacesConverter (value = "FaxNumberConverter")
+public class AddressbookFaxNumberConverter implements Converter {
+
+       /**
+        * Logger instance
+        */
+       @Log
+       private LoggerBeanLocal loggerBeanLocal;
+
+       /**
+        * Phone EJB
+        */
+       private PhoneSessionBeanRemote phoneBean;
+
+       /**
+        * Initialization of this converter
+        */
+       public AddressbookFaxNumberConverter () {
+               // Try to get it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Lookup logger
+                       this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
+
+                       // ... and user controller
+                       this.phoneBean = (PhoneSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote"); //NOI18N
+               } catch (final NamingException ex) {
+                       // Continue to throw it
+                       throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
+               }
+       }
+
+       @Override
+       public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
+               // Log message
+               this.loggerBeanLocal.logTrace(MessageFormat.format("{0}.getAsObject: context={1},component={2},submittedValue={3} - CALLED!", this.getClass().getSimpleName(), context, component, submittedValue)); //NOI18N
+
+               // Is the value null or empty?
+               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
+                       // Warning message
+                       this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
+
+                       // Return null
+                       return null;
+               }
+
+               // Init instance
+               DialableFaxNumber faxNumber = null;
+
+               try {
+                       // Try to parse the value as long
+                       Long faxNumberId = Long.valueOf(submittedValue);
+
+                       // Log message
+                       this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject: faxNumberId={1}", this.getClass().getSimpleName(), faxNumberId)); //NOI18N
+
+                       // Try to get mobile instance from it
+                       faxNumber = this.phoneBean.findFaxNumberById(faxNumberId);
+               } catch (final NumberFormatException ex) {
+                       // Throw again
+                       throw new ConverterException(ex);
+               } catch (final PhoneEntityNotFoundException ex) {
+                       // Debug message
+                       this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject(): Exception: {1} - Returning null ...", this.getClass().getSimpleName(), ex)); //NOI18N
+               }
+
+               // Log message
+               this.loggerBeanLocal.logTrace(MessageFormat.format("{0}.getAsObject: faxNumber={1} - EXIT!", this.getClass().getSimpleName(), faxNumber)); //NOI18N
+
+               // Return it
+               return faxNumber;
+       }
+
+       @Override
+       public String getAsString (final FacesContext context, final UIComponent component, final Object value) {
+               // Is the object null?
+               if ((null == value) || ((String.valueOf(value)).isEmpty())) {
+                       // Is null
+                       return ""; //NOI18N
+               } else if (!(value instanceof DialableNumber)) {
+                       // Not same interface
+                       throw new IllegalArgumentException(MessageFormat.format("value {0} does not implement DialableNumber.", value)); //NOI18N
+               }
+
+               // Return category id
+               return String.valueOf(((DialableNumber) value).getPhoneId());
+       }
+
+}
index 2c870d38c49d7f5c184decee2a3f451775e0213d..9ee793da5a0d9bb35b79bbde317ccc7092f6dfac 100644 (file)
-/*\r
- * Copyright (C) 2017 Roland Häder\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU Affero General Public License as\r
- * published by the Free Software Foundation, either version 3 of the\r
- * License, or (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU Affero General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Affero General Public License\r
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-package org.mxchange.addressbook.converter.landline;\r
-\r
-import java.text.MessageFormat;\r
-import javax.faces.component.UIComponent;\r
-import javax.faces.context.FacesContext;\r
-import javax.faces.convert.Converter;\r
-import javax.faces.convert.ConverterException;\r
-import javax.faces.convert.FacesConverter;\r
-import javax.naming.Context;\r
-import javax.naming.InitialContext;\r
-import javax.naming.NamingException;\r
-import org.mxchange.jcoreeelogger.beans.local.logger.Log;\r
-import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;\r
-import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException;\r
-import org.mxchange.jphone.phonenumbers.DialableNumber;\r
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;\r
-import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote;\r
-\r
-/**\r
- * Converter for land-line id <-> valid land-line number instance\r
- * <p>\r
- * @author Roland Häder<roland@mxchange.org>\r
- */\r
-@FacesConverter (value = "LandLineNumberConverter")\r
-public class AddressbookLandLineNumberConverter implements Converter {\r
-\r
-       /**\r
-        * Logger instance\r
-        */\r
-       @Log\r
-       private LoggerBeanLocal loggerBeanLocal;\r
-\r
-       /**\r
-        * Phone EJB\r
-        */\r
-       private PhoneSessionBeanRemote phoneBean;\r
-\r
-       /**\r
-        * Initialization of this converter\r
-        */\r
-       public AddressbookLandLineNumberConverter () {\r
-               // Try to get it\r
-               try {\r
-                       // Get initial context\r
-                       Context context = new InitialContext();\r
-\r
-                       // Lookup logger\r
-                       this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N\r
-\r
-                       // ... and user controller\r
-                       this.phoneBean = (PhoneSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote"); //NOI18N\r
-               } catch (final NamingException ex) {\r
-                       // Continue to throw it\r
-                       throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N\r
-               }\r
-       }\r
-\r
-       @Override\r
-       public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {\r
-               // Is the value null or empty?\r
-               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {\r
-                       // Warning message\r
-                       this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N\r
-\r
-                       // Return null\r
-                       return null;\r
-               }\r
-\r
-               // Init instance\r
-               DialableLandLineNumber landLineNumber = null;\r
-\r
-               try {\r
-                       // Try to parse the value as long\r
-                       Long landLineNumberId = Long.valueOf(submittedValue);\r
-\r
-                       // Try to get mobile instance from it\r
-                       landLineNumber = this.phoneBean.findLandLineNumberById(landLineNumberId);\r
-               } catch (final NumberFormatException ex) {\r
-                       // Throw again\r
-                       throw new ConverterException(ex);\r
-               } catch (final PhoneEntityNotFoundException ex) {\r
-                       // Debug message\r
-                       this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject(): Exception: {1} - Returning null ...", this.getClass().getSimpleName(), ex)); //NOI18N\r
-               }\r
-\r
-               // Return it\r
-               return landLineNumber;\r
-       }\r
-\r
-       @Override\r
-       public String getAsString (final FacesContext context, final UIComponent component, final Object value) {\r
-               // Is the object null?\r
-               if ((null == value) || ((String.valueOf(value)).isEmpty())) {\r
-                       // Is null\r
-                       return ""; //NOI18N\r
-               } else if (!(value instanceof DialableNumber)) {\r
-                       // Not same interface\r
-                       throw new IllegalArgumentException(MessageFormat.format("value {0} does not implement DialableNumber.", value)); //NOI18N\r
-               }\r
-\r
-               // Return category id\r
-               return String.valueOf(((DialableNumber) value).getPhoneId());\r
-       }\r
-\r
-}\r
+/*
+ * Copyright (C) 2017 Roland Häder
+ *
+ * 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.converter.landline;
+
+import java.text.MessageFormat;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.convert.FacesConverter;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jcoreeelogger.beans.local.logger.Log;
+import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
+import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException;
+import org.mxchange.jphone.phonenumbers.DialableNumber;
+import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote;
+
+/**
+ * Converter for land-line id <-> valid land-line number instance
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@FacesConverter (value = "LandLineNumberConverter")
+public class AddressbookLandLineNumberConverter implements Converter {
+
+       /**
+        * Logger instance
+        */
+       @Log
+       private LoggerBeanLocal loggerBeanLocal;
+
+       /**
+        * Phone EJB
+        */
+       private PhoneSessionBeanRemote phoneBean;
+
+       /**
+        * Initialization of this converter
+        */
+       public AddressbookLandLineNumberConverter () {
+               // Try to get it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Lookup logger
+                       this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
+
+                       // ... and user controller
+                       this.phoneBean = (PhoneSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote"); //NOI18N
+               } catch (final NamingException ex) {
+                       // Continue to throw it
+                       throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
+               }
+       }
+
+       @Override
+       public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
+               // Is the value null or empty?
+               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
+                       // Warning message
+                       this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
+
+                       // Return null
+                       return null;
+               }
+
+               // Init instance
+               DialableLandLineNumber landLineNumber = null;
+
+               try {
+                       // Try to parse the value as long
+                       Long landLineNumberId = Long.valueOf(submittedValue);
+
+                       // Try to get mobile instance from it
+                       landLineNumber = this.phoneBean.findLandLineNumberById(landLineNumberId);
+               } catch (final NumberFormatException ex) {
+                       // Throw again
+                       throw new ConverterException(ex);
+               } catch (final PhoneEntityNotFoundException ex) {
+                       // Debug message
+                       this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject(): Exception: {1} - Returning null ...", this.getClass().getSimpleName(), ex)); //NOI18N
+               }
+
+               // Return it
+               return landLineNumber;
+       }
+
+       @Override
+       public String getAsString (final FacesContext context, final UIComponent component, final Object value) {
+               // Is the object null?
+               if ((null == value) || ((String.valueOf(value)).isEmpty())) {
+                       // Is null
+                       return ""; //NOI18N
+               } else if (!(value instanceof DialableNumber)) {
+                       // Not same interface
+                       throw new IllegalArgumentException(MessageFormat.format("value {0} does not implement DialableNumber.", value)); //NOI18N
+               }
+
+               // Return category id
+               return String.valueOf(((DialableNumber) value).getPhoneId());
+       }
+
+}
index 52f1cc58c144b30568f037bfe224047f3523953c..53c83f28917cc8de0982312312b7a8df65e578e1 100644 (file)
@@ -19,7 +19,7 @@
                        <h:outputText id="userId" styleClass="table_data_field" value="#{beanHelper.user.userId}" />
                </h:column>
 
-               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
                        <h:column>
                                <h:outputLabel for="userName" styleClass="table_data_label" value="#{msg.ADMIN_USER_NAME}" />
 
index 42e57557ec531fc499d1f7e40be2111dbd22db41..c3a137cd139957b42eeef68ea9a124b91a39aac9 100644 (file)
@@ -23,7 +23,7 @@
                        </h:panelGroup>
                </h:column>
 
-               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
                        <h:column>
                                <h:outputLabel for="userName" styleClass="table_data_label" value="#{msg.ADMIN_USER_NAME}" />
 
index 1bc058f8a534ab161d6d9259133583958a2ed1e6..778b49465c208c8eefd7b0585ad65bcfbaa9d037 100644 (file)
@@ -22,7 +22,7 @@
                        </div>
 
                        <ul>
-                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
                                        <li>
                                                <h:link title="#{msg.LINK_GUEST_LOGIN_TITLE}" outcome="user_login" value="#{msg.LINK_GUEST_LOGIN}" />
                                        </li>
@@ -34,7 +34,7 @@
                                        </li>
                                </ui:fragment>
 
-                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required') and featureController.isFeatureEnabled('user_password_recovery')}">
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name') and featureController.isFeatureEnabled('user_password_recovery')}">
                                        <li>
                                                <h:link title="#{msg.LINK_GUEST_PASSWORD_TITLE}" outcome="user_lost_password" value="#{msg.LINK_GUEST_PASSWORD}" />
                                        </li>
index cc8edcf362cfce6df68ade8afcf3ee9469306079..74f86eebebdfc7913d991cc16fdb2bde121dd397 100644 (file)
@@ -5,7 +5,7 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
        <div id="user_login_content">
-               <h:form id="form_user_login" rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+               <h:form id="form_user_login" rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
                        <h:panelGroup styleClass="table" layout="block">
                                <div class="table_header">
                                        <h:outputText value="#{msg.GUEST_ENTER_USER_LOGIN_DATA_TITLE}" />
@@ -56,7 +56,7 @@
                        </h:panelGroup>
                </h:form>
 
-               <h:panelGroup styleClass="error_container" layout="block" rendered="#{not featureController.isFeatureEnabled('user_name_required')}">
+               <h:panelGroup styleClass="error_container" layout="block" rendered="#{not featureController.isFeatureEnabled('user_login_require_user_name')}">
                        <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_NAME_REQUIRED_DISABLED}" />
                </h:panelGroup>
        </div>
index 97af2dbae5cbca485903cd8adef778ff7b946322..e7f92540957f4a8cc9a590dcbcdf7b39e0733675 100644 (file)
@@ -17,7 +17,7 @@
                                                <h:outputText value="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND}" />
                                        </legend>
 
-                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
                                                <h:panelGroup styleClass="table_row" layout="block">
                                                        <div class="table_left_medium">
                                                                <h:outputLabel for="userName" value="#{msg.GUEST_REGISTRATION_ENTER_USER_NAME}" />
@@ -37,7 +37,7 @@
 
                                        <ui:include src="/WEB-INF/templates/guest/guest_email_address_repeat_fields.tpl" />
 
-                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
                                                <div class="para"></div>
 
                                                <h:panelGroup styleClass="table_row" layout="block">
index 7fb7d9c8e3a0f8b076d3fda56699957a6458202f..98f822df618c26f914d3a7d90b9a6866428685ff 100644 (file)
@@ -19,7 +19,7 @@
                                                <h:outputText value="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND}" />
                                        </legend>
 
-                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
                                                <h:panelGroup styleClass="table_row" layout="block">
                                                        <div class="table_left">
                                                                <h:outputLabel for="userName" value="#{msg.GUEST_REGISTRATION_ENTER_USER_NAME}" />
@@ -39,7 +39,7 @@
 
                                        <ui:include src="/WEB-INF/templates/guest/guest_email_address_repeat_fields.tpl" />
 
-                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
                                                <div class="para"></div>
 
                                                <h:panelGroup styleClass="table_row" layout="block">
index 06e5e8bfbe3475973ff6ef47e79e67264540fd74..2355decd2f170ed5a8df09b741047c2858473461 100644 (file)
@@ -19,7 +19,7 @@
     </context-param>
     <context-param>
         <description>Whether a user name is required for this application.</description>
-        <param-name>is_feature_user_name_required_enabled</param-name>
+        <param-name>is_feature_user_login_require_user_name_enabled</param-name>
         <param-value>true</param-value>
     </context-param>
     <context-param>
         <param-value>false</param-value>
     </context-param>
     <context-param>
-        <description>Whether the public user profile is enabled. If this option is enabled, the setting "is_user_name_required" must also be enabled as it is mandadory.</description>
+        <description>Whether the public user profile is enabled. If this option is enabled, the setting "is_user_login_require_user_name" must also be enabled as it is mandadory.</description>
         <param-name>is_public_profile_enabled</param-name>
         <param-value>true</param-value>
     </context-param>
     <context-param>
         <description>Whether user names are required for completing registration.</description>
-        <param-name>is_user_name_required</param-name>
+        <param-name>is_user_login_require_user_name</param-name>
         <param-value>true</param-value>
     </context-param>
     <context-param>
index 9e714dc029b4e373017493041d6787f737c66c92..9d7ca70db7c3eb86469472f564f90e427371d831 100644 (file)
@@ -42,7 +42,7 @@
                                        </h:link>
                                </h:column>
 
-                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
                                        <h:column>
                                                <f:facet name="header">
                                                        <h:outputText value="#{msg.ADMIN_LIST_USER_NAME}" />
index 407caadadd478f95e6cef091083b2a731691142e..b44a9eee4e77ce670fab58d3eabbabb80092498d 100644 (file)
@@ -36,7 +36,7 @@
                                                </h:link>
                                        </p:column>
 
-                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
                                                <p:column>
                                                        <f:facet name="header">
                                                                <h:outputText value="#{msg.ADMIN_EXPORT_USER_NAME_TITLE}" />
index 546c88281f77ea72bcc12b45fb3d6432911774f4..23890a9ae54138dd4a7d3bb6fc7379ac50d3b983 100644 (file)
@@ -36,7 +36,7 @@
                                        </h:link>
                                </h:column>
 
-                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
                                        <h:column>
                                                <f:facet name="header">
                                                        <h:outputText value="#{msg.ADMIN_LIST_USER_NAME}" />
index 94ea425cbce2df9bd064da28d312a45ff773fd36..8cae955a5236c31adfff11a462e067dd3842dd0b 100644 (file)
@@ -17,7 +17,7 @@
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
                                <h:panelGroup styleClass="para" layout="block" rendered="#{featureController.isFeatureEnabled('user_registration')}">
                                        <h:outputText value="#{msg.GUEST_USER_NO_ACCOUNT_YET_QUESTION}" />
 
                                        <ui:include src="/WEB-INF/templates/guest/user/guest_login_form.tpl" />
                                </div>
 
-                               <h:panelGroup styleClass="para" layout="block" rendered="#{featureController.isFeatureEnabled('user_name_required') and featureController.isFeatureEnabled('user_password_recovery')}">
+                               <h:panelGroup styleClass="para" layout="block" rendered="#{featureController.isFeatureEnabled('user_login_require_user_name') and featureController.isFeatureEnabled('user_password_recovery')}">
                                        <h:link id="user_lost_password" outcome="user_lost_password" title="#{msg.LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD}" value="#{msg.LINK_GUEST_LOGIN_LOST_PASSWORD}" />
                                </h:panelGroup>
                        </ui:fragment>
 
-                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_name_required')}">
+                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_login_require_user_name')}">
                                <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
                                        <ui:param name="message" value="#{msg.ERROR_GUEST_USER_LOGIN_DEACTIVATED}" />
                                        <ui:param name="styleClass" value="errors" />
index fd429a4532e8b9b884b3dcb632ce5baca21a918d..b4a54a36e9c8faa88fc8ac3eb205ff3423c561ca 100644 (file)
@@ -18,7 +18,7 @@
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required') and featureController.isFeatureEnabled('user_password_recovery')}">
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name') and featureController.isFeatureEnabled('user_password_recovery')}">
                                <div class="para" id="user_lost_password_content">
                                        <h:form id="form_lost_password">
                                                <h:panelGroup styleClass="table" layout="block">
@@ -70,7 +70,7 @@
                                </div>
                        </ui:fragment>
 
-                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_name_required') or not featureController.isFeatureEnabled('user_password_recovery')}">
+                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_login_require_user_name') or not featureController.isFeatureEnabled('user_password_recovery')}">
                                <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
                                        <ui:param name="message" value="#{msg.ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED}" />
                                        <ui:param name="styleClass" value="errors" />
index 9e33b2c64fc5596e564a0d158e718c7bb012a9fd..61f08ed53f2a180b68f622f1b5d23523f4279d53 100644 (file)
@@ -18,7 +18,7 @@
 
                <ui:define name="content">
                        <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_registration_in_index') and featureController.isFeatureEnabled('user_registration')}">
-                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
                                        <h:panelGroup styleClass="para" layout="block">
                                                <h:outputText value="#{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1}" />
                                                <h:outputText value="&nbsp;" />
index fe89f8761095424e4739c76878fb3a126eb887f0..7e180037b408896f108300254f64ea267d442e7c 100644 (file)
@@ -19,7 +19,7 @@
 
                <ui:define name="content">
                        <ui:fragment rendered="#{featureController.isFeatureEnabled('user_register_multiple_page')}">
-                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
                                        <div class="para">
                                                <h:outputText value="#{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1}" />
                                                <h:link outcome="user_login" value="#{msg.CLICK_HERE}" />