]> git.mxchange.org Git - addressbook-war.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Wed, 14 Oct 2015 11:00:06 +0000 (13:00 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 14 Oct 2015 11:04:46 +0000 (13:04 +0200)
- added user profile visibility flag to registration form
- moved all converter to proper directory
- added missing strings to i18n file
- renamed some for better naming convention
- registered validator with this application
Signed-off-by:Roland Häder <roland@mxchange.org>

src/java/org/mxchange/addressbook/beans/user/UserWebController.java
src/java/org/mxchange/addressbook/converter/TrueFalseToBooleanConverter.java [new file with mode: 0644]
src/java/org/mxchange/jcountry/data/CountryConverter.java [deleted file]
src/java/org/mxchange/jcountry/data/converter/CountryConverter.java [new file with mode: 0644]
src/java/org/mxchange/jphone/phonenumbers/smsprovider/SmsProviderConverter.java [deleted file]
src/java/org/mxchange/jphone/phonenumbers/smsprovider/converter/SmsProviderConverter.java [new file with mode: 0644]
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/generic/form_personal_data.tpl

index f5df38c9246df8707e8416d55e02e2dc64b587f5..c1352663a23e0467012a7a428c2f919a270cc99c 100644 (file)
@@ -31,7 +31,9 @@ import org.mxchange.jusercore.model.user.User;
 public interface UserWebController extends Serializable {
 
        /**
-        * Adds user's name and email address to bean's internal list
+        * Adds user's name and email address to bean's internal list. It also
+        * updates the public user list if the user has decided to have a public
+        * profile on registration.
         * <p>
         * @param user User instance
         */
diff --git a/src/java/org/mxchange/addressbook/converter/TrueFalseToBooleanConverter.java b/src/java/org/mxchange/addressbook/converter/TrueFalseToBooleanConverter.java
new file mode 100644 (file)
index 0000000..9d63a00
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2015 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.converter;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.FacesConverter;
+
+/**
+ * A converter to convert "true" to boolean true and "false" to boolean false
+ * <p>
+ * @author Roland Haeder
+ */
+@FacesConverter(value = "trueFalse")
+public class TrueFalseToBooleanConverter implements Converter {
+
+       @Override
+       public Object getAsObject (final FacesContext context, final UIComponent component, final String value) {
+               return Boolean.valueOf(value);
+       }
+
+       @Override
+       public String getAsString (final FacesContext context, final UIComponent component, final Object value) {
+               return Boolean.toString((Boolean) value);
+       }
+}
diff --git a/src/java/org/mxchange/jcountry/data/CountryConverter.java b/src/java/org/mxchange/jcountry/data/CountryConverter.java
deleted file mode 100644 (file)
index 71b108b..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (C) 2015 Roland Haeder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jcountry.data;
-
-import java.text.MessageFormat;
-import java.util.List;
-import java.util.Objects;
-import javax.annotation.PostConstruct;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-import javax.faces.convert.FacesConverter;
-import javax.inject.Inject;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import org.mxchange.addressbook.beans.country.CountryWebController;
-import org.mxchange.jcoreeelogger.beans.local.logger.Log;
-import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
-
-/**
- * Converter for country instance
- * <p>
- * @author Roland Haeder
- */
-@FacesConverter (value = "country")
-public class CountryConverter implements Converter {
-
-       /**
-        * Category bean
-        */
-       @Inject
-       private CountryWebController countryController;
-
-       /**
-        * Logger instance
-        */
-       @Log
-       private LoggerBeanLocal loggerBeanLocal;
-
-       @Override
-       public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
-               // Trace message
-               this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: contect={0},component={1},submittedValue={2} - CALLED!", context, component, submittedValue)); //NOI18N
-
-               // Get full list
-               List<Country> countryList = this.countryController.allCountries();
-
-               // Is the value null or empty?
-               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
-                       // Return null
-                       return null;
-               }
-
-               // Init value
-               Country country = null;
-
-               // Try this better
-               try {
-                       // Convert it to long
-                       Long countryId = Long.parseLong(submittedValue);
-
-                       // Category id should not be below 1
-                       assert (countryId > 0) : "countryId is smaller than one: " + countryId; //NOI18N
-
-                       // Debug message
-                       this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: countryId={0}", countryId)); //NOI18N
-
-                       // Try to find it
-                       for (final Country cntry : countryList) {
-                               // Is the id the same? (null-safe)
-                               if (Objects.equals(cntry.getCountryId(), countryId)) {
-                                       // Found it
-                                       country = cntry;
-                                       break;
-                               }
-                       }
-               } catch (final NumberFormatException ex) {
-                       // Log exception (maybe to much?)
-                       this.loggerBeanLocal.logException(ex);
-               }
-
-               // Trace message
-               this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: country={0} - EXIT!", country)); //NOI18N
-
-               // Return it
-               return country;
-       }
-
-       @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 Country)) {
-                       // Not same interface
-                       throw new IllegalArgumentException(MessageFormat.format("value {0} does not implement Country.", value)); //NOI18N
-               }
-
-               // Return category id
-               return String.valueOf(((Country) value).getCountryId());
-       }
-
-       /**
-        * Initialization of this converter
-        */
-       @PostConstruct
-       public void init () {
-               // 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
-               } catch (final NamingException ex) {
-                       // Continue to throw it
-                       throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
-               }
-       }
-}
diff --git a/src/java/org/mxchange/jcountry/data/converter/CountryConverter.java b/src/java/org/mxchange/jcountry/data/converter/CountryConverter.java
new file mode 100644 (file)
index 0000000..b8f516f
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2015 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcountry.data.converter;
+
+import java.text.MessageFormat;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.PostConstruct;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.FacesConverter;
+import javax.inject.Inject;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.country.CountryWebController;
+import org.mxchange.jcoreeelogger.beans.local.logger.Log;
+import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
+import org.mxchange.jcountry.data.Country;
+
+/**
+ * Converter for country instance
+ * <p>
+ * @author Roland Haeder
+ */
+@FacesConverter (value = "country")
+public class CountryConverter implements Converter {
+
+       /**
+        * Category bean
+        */
+       @Inject
+       private CountryWebController countryController;
+
+       /**
+        * Logger instance
+        */
+       @Log
+       private LoggerBeanLocal loggerBeanLocal;
+
+       @Override
+       public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
+               // Trace message
+               this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: contect={0},component={1},submittedValue={2} - CALLED!", context, component, submittedValue)); //NOI18N
+
+               // Get full list
+               List<Country> countryList = this.countryController.allCountries();
+
+               // Is the value null or empty?
+               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
+                       // Return null
+                       return null;
+               }
+
+               // Init value
+               Country country = null;
+
+               // Try this better
+               try {
+                       // Convert it to long
+                       Long countryId = Long.parseLong(submittedValue);
+
+                       // Category id should not be below 1
+                       assert (countryId > 0) : "countryId is smaller than one: " + countryId; //NOI18N
+
+                       // Debug message
+                       this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: countryId={0}", countryId)); //NOI18N
+
+                       // Try to find it
+                       for (final Country cntry : countryList) {
+                               // Is the id the same? (null-safe)
+                               if (Objects.equals(cntry.getCountryId(), countryId)) {
+                                       // Found it
+                                       country = cntry;
+                                       break;
+                               }
+                       }
+               } catch (final NumberFormatException ex) {
+                       // Log exception (maybe to much?)
+                       this.loggerBeanLocal.logException(ex);
+               }
+
+               // Trace message
+               this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: country={0} - EXIT!", country)); //NOI18N
+
+               // Return it
+               return country;
+       }
+
+       @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 Country)) {
+                       // Not same interface
+                       throw new IllegalArgumentException(MessageFormat.format("value {0} does not implement Country.", value)); //NOI18N
+               }
+
+               // Return category id
+               return String.valueOf(((Country) value).getCountryId());
+       }
+
+       /**
+        * Initialization of this converter
+        */
+       @PostConstruct
+       public void init () {
+               // 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
+               } catch (final NamingException ex) {
+                       // Continue to throw it
+                       throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+               }
+       }
+}
diff --git a/src/java/org/mxchange/jphone/phonenumbers/smsprovider/SmsProviderConverter.java b/src/java/org/mxchange/jphone/phonenumbers/smsprovider/SmsProviderConverter.java
deleted file mode 100644 (file)
index 2cfeb90..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (C) 2015 Roland Haeder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jphone.phonenumbers.smsprovider;
-
-import java.text.MessageFormat;
-import java.util.List;
-import java.util.Objects;
-import javax.annotation.PostConstruct;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-import javax.faces.convert.FacesConverter;
-import javax.inject.Inject;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import org.mxchange.addressbook.beans.smsprovider.SmsProviderWebController;
-import org.mxchange.jcoreeelogger.beans.local.logger.Log;
-import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
-
-/**
- * Converter for SMS provider instance
- * <p>
- * @author Roland Haeder
- */
-@FacesConverter (value = "cellphoneCarrier")
-public class SmsProviderConverter implements Converter {
-
-       /**
-        * Logger instance
-        */
-       @Log
-       private LoggerBeanLocal loggerBeanLocal;
-
-       /**
-        * Category bean
-        */
-       @Inject
-       private SmsProviderWebController providerController;
-
-       @Override
-       public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
-               // Trace message
-               this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: contect={0},component={1},submittedValue={2} - CALLED!", context, component, submittedValue)); //NOI18N
-
-               // Get full list
-               List<SmsProvider> providerList = this.providerController.allSmsProvider();
-
-               // Is the value null or empty?
-               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
-                       // Return null
-                       return null;
-               }
-
-               // Init value
-               SmsProvider provider = null;
-
-               // Try this better
-               try {
-                       // Convert it to long
-                       Long providerId = Long.parseLong(submittedValue);
-
-                       // Category id should not be below 1
-                       assert (providerId > 0) : "providerId is smaller than one: " + providerId; //NOI18N
-
-                       // Debug message
-                       this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: providerId={0}", providerId)); //NOI18N
-
-                       // Try to find it
-                       for (final SmsProvider prov : providerList) {
-                               // Is the id the same? (null-safe)
-                               if (Objects.equals(prov.getProviderId(), providerId)) {
-                                       // Found it
-                                       provider = prov;
-                                       break;
-                               }
-                       }
-               } catch (final NumberFormatException ex) {
-                       // Log exception (maybe to much?)
-                       this.loggerBeanLocal.logException(ex);
-               }
-
-               // Trace message
-               this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: provider={0} - EXIT!", provider)); //NOI18N
-
-               // Return it
-               return provider;
-       }
-
-       @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 SmsProvider)) {
-                       // Not same interface
-                       throw new IllegalArgumentException(MessageFormat.format("value {0} does not implement SmsProvider.", value)); //NOI18N
-               }
-
-               // Return category id
-               return String.valueOf(((SmsProvider) value).getProviderId());
-       }
-
-       /**
-        * Initialization of this converter
-        */
-       @PostConstruct
-       public void init () {
-               // 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
-               } catch (final NamingException ex) {
-                       // Continue to throw it
-                       throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
-               }
-       }
-
-}
diff --git a/src/java/org/mxchange/jphone/phonenumbers/smsprovider/converter/SmsProviderConverter.java b/src/java/org/mxchange/jphone/phonenumbers/smsprovider/converter/SmsProviderConverter.java
new file mode 100644 (file)
index 0000000..41bafe7
--- /dev/null
@@ -0,0 +1,138 @@
+/*
+ * Copyright (C) 2015 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jphone.phonenumbers.smsprovider.converter;
+
+import java.text.MessageFormat;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.PostConstruct;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.FacesConverter;
+import javax.inject.Inject;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.smsprovider.SmsProviderWebController;
+import org.mxchange.jcoreeelogger.beans.local.logger.Log;
+import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
+import org.mxchange.jphone.phonenumbers.smsprovider.SmsProvider;
+
+/**
+ * Converter for SMS provider instance
+ * <p>
+ * @author Roland Haeder
+ */
+@FacesConverter (value = "cellphoneCarrier")
+public class SmsProviderConverter implements Converter {
+
+       /**
+        * Logger instance
+        */
+       @Log
+       private LoggerBeanLocal loggerBeanLocal;
+
+       /**
+        * Category bean
+        */
+       @Inject
+       private SmsProviderWebController providerController;
+
+       @Override
+       public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
+               // Trace message
+               this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: contect={0},component={1},submittedValue={2} - CALLED!", context, component, submittedValue)); //NOI18N
+
+               // Get full list
+               List<SmsProvider> providerList = this.providerController.allSmsProvider();
+
+               // Is the value null or empty?
+               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
+                       // Return null
+                       return null;
+               }
+
+               // Init value
+               SmsProvider provider = null;
+
+               // Try this better
+               try {
+                       // Convert it to long
+                       Long providerId = Long.parseLong(submittedValue);
+
+                       // Category id should not be below 1
+                       assert (providerId > 0) : "providerId is smaller than one: " + providerId; //NOI18N
+
+                       // Debug message
+                       this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: providerId={0}", providerId)); //NOI18N
+
+                       // Try to find it
+                       for (final SmsProvider prov : providerList) {
+                               // Is the id the same? (null-safe)
+                               if (Objects.equals(prov.getProviderId(), providerId)) {
+                                       // Found it
+                                       provider = prov;
+                                       break;
+                               }
+                       }
+               } catch (final NumberFormatException ex) {
+                       // Log exception (maybe to much?)
+                       this.loggerBeanLocal.logException(ex);
+               }
+
+               // Trace message
+               this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: provider={0} - EXIT!", provider)); //NOI18N
+
+               // Return it
+               return provider;
+       }
+
+       @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 SmsProvider)) {
+                       // Not same interface
+                       throw new IllegalArgumentException(MessageFormat.format("value {0} does not implement SmsProvider.", value)); //NOI18N
+               }
+
+               // Return category id
+               return String.valueOf(((SmsProvider) value).getProviderId());
+       }
+
+       /**
+        * Initialization of this converter
+        */
+       @PostConstruct
+       public void init () {
+               // 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
+               } catch (final NamingException ex) {
+                       // Continue to throw it
+                       throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+               }
+       }
+
+}
index 7b2d9d282fe04357dcaf86ae61863225385a14da..89344e29e14a3cf6e4109e6b39ae3e20bba3d4f1 100644 (file)
@@ -200,3 +200,9 @@ TABLE_SUMMARY_LOGIN_SHARED_ADDRESSBOOKS=Diese Tabelle listed alle von Ihnen mit
 LOGIN_USER_HAS_NOT_SHARED_ADDRESSBOOKS=Derzeit teilen Sie keine Adressb\u00fccher mit anderen Benutzern.
 LOGIN_TABLE_HEADER_USER_LIST=Alle Benutzer auflisten
 TABLE_SUMMARY_LOGIN_USER_LIST=Diese Tabelle listet alle registrierten Benutzer aus, mit denen Sie Ihre Adressb\u00fccher teilen k\u00f6nnen.
+USER_PROFILE_LEGEND=\u00d6ffentlich einsehbares Profil:
+USER_PROFILE_LEGEND_TITLE=Machen Sie hier Einstellungen zu Ihrem im Internet \u00f6ffentlich einsehbarem Profil.
+PUBLIC_USER_PROFILE_FLAG=Soll Ihr Profil im Internet einsehbar sein?
+PUBLIC_USER_PROFILE_NOT_CHOOSEN_MESSAGE=Bitte w\u00e4hlen Sie aus, ob Ihr Profil im Internet sichtbar sein soll.
+PUBLIC_PROFILE_ENABLED=Ist sichtbar
+PUBLIC_PROFILE_DISABLED=Ist nicht sichtbar
index d9124c031627d6be6b1c6ffd3cdf4743ece17c52..3b49186f978beb3c3f7849e004da5a833bcdbc10 100644 (file)
@@ -200,3 +200,9 @@ TABLE_SUMMARY_LOGIN_SHARED_ADDRESSBOOKS=This table lists all your with other use
 LOGIN_USER_HAS_NOT_SHARED_ADDRESSBOOKS=Currently you don't share any address books with other users.
 LOGIN_TABLE_HEADER_USER_LIST=List all users
 TABLE_SUMMARY_LOGIN_USER_LIST=This table lists all registered users you can share your address books with.
+USER_PROFILE_LEGEND=Publicly visible profile:
+USER_PROFILE_LEGEND_TITLE=Do settings here for your in Internet publicly visible profile.
+PUBLIC_USER_PROFILE_FLAG=Should your profile be visible in Internet?
+PUBLIC_USER_PROFILE_NOT_CHOOSEN_MESSAGE=Please choose whether your profile should be visible in Internet.
+PUBLIC_PROFILE_ENABLED=Is visible
+PUBLIC_PROFILE_DISABLED=Is not visible
index be48264e70fc07d17d97ca0d35ab85f10cc016df..e3cc2c23b6dcee2acda2156787e38c741c797973 100644 (file)
                <validator-id>AddressbookIdValidator</validator-id>
                <validator-class>org.mxchange.addressbook.validator.addressbook.AddressbookIdValidator</validator-class>
        </validator>
+       <validator>
+               <validator-id>UserProfileVisibilityValidator</validator-id>
+               <validator-class>org.mxchange.addressbook.validator.booleans.UserProfileVisibilityValidator</validator-class>
+       </validator>
        <navigation-rule>
                <from-view-id>*</from-view-id>
                <navigation-case>
index 6b4506214a0b492f41d88c20ee09a3525b481611..7a20d404c003144a1c3da98c29b862aabcf7550c 100644 (file)
                        </div>
                </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="publicUserProfileFlag" value="#{msg.PUBLIC_USER_PROFILE_FLAG}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:selectOneMenu class="select" id="publicUserProfileFlag" required="true" requiredMessage="#{msg.PUBLIC_USER_PROFILE_NOT_CHOOSEN_MESSAGE}">
+                                               <f:selectItem class="option" itemValue="true" itemLabel="#{msg.PUBLIC_PROFILE_ENABLED}" />
+                                               <f:selectItem class="option" itemValue="false" itemLabel="#{msg.PUBLIC_PROFILE_DISABLED}" />
+                                               <f:converter for="publicUserProfileFlag" converterId="trueFalse" />
+                                               <f:validator for="publicUserProfileFlag" validatorId="UserProfileVisibilityValidator" />
+                                       </h:selectOneMenu>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+               </fieldset>
+       </div>
 </ui:composition>