]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Mon, 1 Jun 2020 13:32:24 +0000 (15:32 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 10 Jun 2020 18:01:07 +0000 (20:01 +0200)
- all extra email address validators (so not the generic one) have no attribute
  "allowEmptyRequiredData" anymore as the email address for them (e.g. branch
  office) is always optional
- converted own JSF tag core:outputAdminContactDataFormFields to template again
- reformatted some JSF tags to have each attribute in a single line
- the gender-specific backing bean was superflous since there is a "static
  data" backing bean
- added missing i18n string COUNTRY_POLAND (country was added in JFinancials)
- fixed tpzo in i18n key

Signed-off-by: Roland Häder <roland@mxchange.org>
27 files changed:
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebRequestBean.java
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebRequestController.java
src/java/org/mxchange/jjobs/beans/data/JobsDataWebApplicationBean.java
src/java/org/mxchange/jjobs/beans/helper/JobsWebViewHelperBean.java
src/java/org/mxchange/jjobs/beans/localization/JobsLocalizationSessionBean.java
src/java/org/mxchange/jjobs/beans/localization/JobsLocalizationSessionController.java
src/java/org/mxchange/jjobs/validator/emailaddress/JobsEmailAddressValidator.java
src/java/org/mxchange/jjobs/validator/emailaddress/basicdata/JobsBasicDataEmailAddressValidator.java
src/java/org/mxchange/jjobs/validator/emailaddress/branchoffice/JobsBranchOfficeEmailAddressValidator.java
src/java/org/mxchange/jjobs/validator/emailaddress/employee/JobsEmployeeEmailAddressValidator.java
src/java/org/mxchange/jjobs/validator/emailaddress/headquarter/JobsHeadquarterEmailAddressValidator.java
src/java/org/mxchange/localization/generic_de_DE.properties
src/java/org/mxchange/localization/generic_en_US.properties
web/WEB-INF/faces-config.xml
web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl [deleted file]
web/WEB-INF/resources/tags/input/selection_box/personal_title_selection_box.tpl
web/WEB-INF/templates/admin/branch_office/admin_form_branch_office_data.tpl
web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/country/admin_form_country_data.tpl
web/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl
web/WEB-INF/templates/admin/headquarter/admin_form_headquarter.tpl
web/WEB-INF/validators.jsf.taglib.xml
web/WEB-INF/widgets.jsf.taglib.xml
web/admin/basic_data/admin_basic_data_list.xhtml
web/admin/contact/admin_contact_edit.xhtml
web/admin/contact/admin_contact_list.xhtml
web/admin/user/admin_user_list.xhtml

index ff309d80e16174c566d54c4d8fb1d8be83c2492a..248a06b6cd6e1d8202395d6c98c1791e41f3f2f5 100644 (file)
@@ -479,17 +479,6 @@ public class JobsContactWebRequestBean extends BaseJobsBean implements JobsConta
                this.comment = comment;
        }
 
-       @Override
-       public String getControllerType () {
-               return "general"; //NOI18N
-       }
-
-       @Override
-       @Deprecated
-       public void setControllerType (final String controllerType) {
-               throw new UnsupportedOperationException("Setting controller type is not supported."); //NOI18N
-       }
-
        /**
         * Getter for country instance
         * <p>
index 3f58bb01fc81fab934a42f02c6c4e713f8d6150a..205a6c830f81c34cb8c46e2e92a8666fd855bdaa 100644 (file)
@@ -50,23 +50,6 @@ public interface JobsContactWebRequestController extends Serializable {
         */
        Contact createContactInstance ();
 
-       /**
-        * Getter for controller type
-        * <p>
-        * @return controller type
-        */
-       String getControllerType ();
-
-       /**
-        * Setter for controller type
-        * <p>
-        * @param controllerType Controller type
-        * <p>
-        * @deprecated Don't use this method.
-        */
-       @Deprecated
-       void setControllerType (final String controllerType);
-
        /**
         * Checks whether contact instance's email address is used
         * <p>
index c8eed4386bf3b749c66ff02fde81974c87eea6fa..bef50440c999cac033c380274e49752b2ec7f8e2 100644 (file)
@@ -65,11 +65,9 @@ public class JobsDataWebApplicationBean extends BaseJobsBean {
        }
 
        /**
-        * Returns an array of all profile modes <p <p>
-        * @
-        *
-        *
-        * return An array of all profile modes
+        * Returns an array of all profile modes
+        * <p>
+        * @return An array of all profile modes
         */
        public ProfileMode[] getProfileModes () {
                return ProfileMode.values();
@@ -83,4 +81,5 @@ public class JobsDataWebApplicationBean extends BaseJobsBean {
        public UserAccountStatus[] getUserAccountStatuses () {
                return UserAccountStatus.values();
        }
+
 }
index 4c6361f4ac4aabc4a60e36ef9eecdf239eea576d..3d525ceaaceb060143818e53407291b5335d0482 100644 (file)
@@ -456,7 +456,7 @@ public class JobsWebViewHelperBean extends BaseJobsBean implements JobsWebViewHe
                // Is basic company data set?
                if (basicData instanceof BasicData) {
                        // Short or long name?
-                       if (useShortName) {
+                       if (useShortName || basicData.getCompanyName() == null) {
                                // Add company's long name
                                sb.append(basicData.getCompanyShortName()); //NOI18N
                        } else {
index ef60f1272edb7241dec437a027e61ef837fdd58a..ae92b9bc216b3bc0d3a64b69cebe7b27a5460993 100644 (file)
@@ -182,7 +182,7 @@ public class JobsLocalizationSessionBean extends BaseJobsBean implements JobsLoc
                // Has a matching locale
                if (null == newLocale) {
                        // Throw NPE
-                       throw new NullPointerException("this.localeCode=" + this.getLocaleCode() + " cannot be found."); //NOI18N
+                       throw new NullPointerException(MessageFormat.format("this.localeCode={0} cannot be found.", this.getLocaleCode())); //NOI18N
                }
 
                // Then change it
@@ -193,7 +193,13 @@ public class JobsLocalizationSessionBean extends BaseJobsBean implements JobsLoc
        }
 
        @Override
-       public String formatCurrency (final Float amount) {
+       public String formatFloatNumber (final Float amount) {
+               // Is parameter valid?
+               if (null == amount) {
+                       // Throw NPE
+                       throw new NullPointerException("amount is null"); //NOI18N
+               }
+
                // Format amount
                return NUMBER_FORMAT.format(amount);
        }
index 5dead2fe30d07c7591c96cb3a645dc5dc8ac12b1..ff5efc233b6270ae47037c3db62b68d1aaf6bb6f 100644 (file)
@@ -33,7 +33,7 @@ public interface JobsLocalizationSessionController extends Serializable {
         * <p>
         * @return Formatted string
         */
-       String formatCurrency (final Float amount);
+       String formatFloatNumber (final Float amount);
 
        /**
         * Getter for locale
index 1c88b40a46a30516d93f0d0f110f92a5e93a4fd1..b3ae297297122e100a03cfd267164f4c96e6b791 100644 (file)
@@ -65,6 +65,7 @@ public class JobsEmailAddressValidator extends BaseStringValidator {
         * Default constructor
         */
        public JobsEmailAddressValidator () {
+               // Set allowEmpty to FALSE by default
                this.allowEmptyRequiredData = Boolean.FALSE;
        }
 
@@ -79,6 +80,18 @@ public class JobsEmailAddressValidator extends BaseStringValidator {
 
        @Override
        public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException {
+               // Validate parameter
+               if (null == context) {
+                       // Throw NPE
+                       throw new NullPointerException("Parameter context is null"); //NOI18N
+               } else if (null == component) {
+                       // Throw NPE again
+                       throw new NullPointerException("Parameter component is null"); //NOI18N
+               } else if (null == this.allowEmptyRequiredData) {
+                       // Should not be NULL
+                       throw new IllegalStateException("this.allowEmptyRequiredData was set to null, this should not happen."); //NOI18N
+               }
+
                // The required field
                final String[] requiredFields = {"emailAddress", "emailAddressRepeat", "resendEmailAddress"}; //NOI18N
 
index 3aecb692ff3c5e3dc24361acf163dbf55d0d0025..29d17df51b8c0dd7d254d53be1ce4b585ae22792 100644 (file)
@@ -56,42 +56,27 @@ public class JobsBasicDataEmailAddressValidator extends BaseStringValidator {
         */
        private static final long serialVersionUID = 187_536_745_607_195L;
 
-       /**
-        * Whether empty data is allowed
-        */
-       private Boolean allowEmptyRequiredData;
-
-       /**
-        * Default constructor
-        */
-       public JobsBasicDataEmailAddressValidator () {
-               this.allowEmptyRequiredData = Boolean.FALSE;
-       }
-
-       /**
-        * Setter for allowEmptyRequiredData flag
-        * <p>
-        * @param allowEmptyRequiredData Whether empty values are allowed
-        */
-       public void setAllowEmptyRequiredData (final Boolean allowEmptyRequiredData) {
-               this.allowEmptyRequiredData = allowEmptyRequiredData;
-       }
-
        @Override
        public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException {
+               // Validate parameter
+               if (null == context) {
+                       // Throw NPE
+                       throw new NullPointerException("Parameter context is null"); //NOI18N
+               } else if (null == component) {
+                       // Throw NPE again
+                       throw new NullPointerException("Parameter component is null"); //NOI18N
+               }
+
                // The required field
                final String[] requiredFields = {"emailAddress", "emailAddressRepeat", "resendEmailAddress"}; //NOI18N
 
                // Pre-validation (example: not null, not a string, empty string ...)
-               super.preValidate(context, component, value, requiredFields, this.allowEmptyRequiredData);
+               super.preValidate(context, component, value, requiredFields, Boolean.TRUE);
 
                // Is the email address empty and allowed?
-               if (null == value && this.allowEmptyRequiredData) {
+               if (null == value) {
                        // Then accept this here
                        return;
-               } else if (null == value) {
-                       // Abort here
-                       throw new ValidatorException(new FacesMessage("No empty email address allowed.")); //NOI18N
                }
 
                // Get string from object ... ;-)
index 047e07dd2c4fdc08346d601b9f93661902c6bd4b..e6cb1e2343a9ee481e207ce544afc0f039382429 100644 (file)
@@ -56,42 +56,27 @@ public class JobsBranchOfficeEmailAddressValidator extends BaseStringValidator {
         */
        private static final long serialVersionUID = 187_536_745_607_195L;
 
-       /**
-        * Whether empty data is allowed
-        */
-       private Boolean allowEmptyRequiredData;
-
-       /**
-        * Default constructor
-        */
-       public JobsBranchOfficeEmailAddressValidator () {
-               this.allowEmptyRequiredData = Boolean.FALSE;
-       }
-
-       /**
-        * Setter for allowEmptyRequiredData flag
-        * <p>
-        * @param allowEmptyRequiredData Whether empty values are allowed
-        */
-       public void setAllowEmptyRequiredData (final Boolean allowEmptyRequiredData) {
-               this.allowEmptyRequiredData = allowEmptyRequiredData;
-       }
-
        @Override
        public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException {
+               // Validate parameter
+               if (null == context) {
+                       // Throw NPE
+                       throw new NullPointerException("Parameter context is null"); //NOI18N
+               } else if (null == component) {
+                       // Throw NPE again
+                       throw new NullPointerException("Parameter component is null"); //NOI18N
+               }
+
                // The required field
                final String[] requiredFields = {"emailAddress", "emailAddressRepeat", "resendEmailAddress"}; //NOI18N
 
                // Pre-validation (example: not null, not a string, empty string ...)
-               super.preValidate(context, component, value, requiredFields, this.allowEmptyRequiredData);
+               super.preValidate(context, component, value, requiredFields, Boolean.TRUE);
 
-               // Is the email address empty and allowed?
-               if (null == value && this.allowEmptyRequiredData) {
+               // Is the email address empty?
+               if (null == value) {
                        // Then accept this here
                        return;
-               } else if (null == value) {
-                       // Abort here
-                       throw new ValidatorException(new FacesMessage("No empty email address allowed.")); //NOI18N
                }
 
                // Get string from object ... ;-)
index e1525642d9225bcb36e1b8771ac52aac1419a695..e702422c8714a2519e39ed6a967af4791da6b87d 100644 (file)
@@ -56,42 +56,27 @@ public class JobsEmployeeEmailAddressValidator extends BaseStringValidator {
         */
        private static final long serialVersionUID = 187_536_745_607_196L;
 
-       /**
-        * Whether empty data is allowed
-        */
-       private Boolean allowEmptyRequiredData;
-
-       /**
-        * Default constructor
-        */
-       public JobsEmployeeEmailAddressValidator () {
-               this.allowEmptyRequiredData = Boolean.FALSE;
-       }
-
-       /**
-        * Setter for allowEmptyRequiredData flag
-        * <p>
-        * @param allowEmptyRequiredData Whether empty values are allowed
-        */
-       public void setAllowEmptyRequiredData (final Boolean allowEmptyRequiredData) {
-               this.allowEmptyRequiredData = allowEmptyRequiredData;
-       }
-
        @Override
        public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException {
+               // Validate parameter
+               if (null == context) {
+                       // Throw NPE
+                       throw new NullPointerException("Parameter context is null"); //NOI18N
+               } else if (null == component) {
+                       // Throw NPE again
+                       throw new NullPointerException("Parameter component is null"); //NOI18N
+               }
+
                // The required field
                final String[] requiredFields = {"employeeEmailAddress"}; //NOI18N
 
                // Pre-validation (example: not null, not a string, empty string ...)
-               super.preValidate(context, component, value, requiredFields, this.allowEmptyRequiredData);
+               super.preValidate(context, component, value, requiredFields, Boolean.TRUE);
 
                // Is the email address empty and allowed?
-               if (null == value && this.allowEmptyRequiredData) {
+               if (null == value) {
                        // Then accept this here
                        return;
-               } else if (null == value) {
-                       // Abort here
-                       throw new ValidatorException(new FacesMessage("No empty email address allowed.")); //NOI18N
                }
 
                // Get string from object ... ;-)
index bca2a33259cfbdcc462b18a9fbc6a83e9c5e1cc3..c54d457130618a0be14cd4490e7cc42c367da087 100644 (file)
@@ -56,43 +56,27 @@ public class JobsHeadquarterEmailAddressValidator extends BaseStringValidator {
         */
        private static final long serialVersionUID = 187_536_745_607_194L;
 
-       /**
-        * Whether empty data is allowed
-        */
-       private Boolean allowEmptyRequiredData;
-
-       /**
-        * Default constructor
-        */
-       public JobsHeadquarterEmailAddressValidator () {
-               // Default is not allowed
-               this.allowEmptyRequiredData = Boolean.FALSE;
-       }
-
-       /**
-        * Setter for allowEmptyRequiredData flag
-        * <p>
-        * @param allowEmptyRequiredData Whether empty values are allowed
-        */
-       public void setAllowEmptyRequiredData (final Boolean allowEmptyRequiredData) {
-               this.allowEmptyRequiredData = allowEmptyRequiredData;
-       }
-
        @Override
        public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException {
+               // Validate parameter
+               if (null == context) {
+                       // Throw NPE
+                       throw new NullPointerException("Parameter context is null"); //NOI18N
+               } else if (null == component) {
+                       // Throw NPE again
+                       throw new NullPointerException("Parameter component is null"); //NOI18N
+               }
+
                // The required field
                final String[] requiredFields = {"emailAddress", "emailAddressRepeat", "resendEmailAddress"}; //NOI18N
 
                // Pre-validation (example: not null, not a string, empty string ...)
-               super.preValidate(context, component, value, requiredFields, this.allowEmptyRequiredData);
+               super.preValidate(context, component, value, requiredFields, Boolean.TRUE);
 
                // Is the email address empty and allowed?
-               if (null == value && this.allowEmptyRequiredData) {
+               if (null == value) {
                        // Then accept this here
                        return;
-               } else if (null == value) {
-                       // Abort here
-                       throw new ValidatorException(new FacesMessage("No empty email address allowed.")); //NOI18N
                }
 
                // Get string from object ... ;-)
index 6b7efdb4afbd9785c475b043b2f9a42ba35b3b75..ade43ddfaf2589e7c12ffc52b5bd5ed6b2965041 100644 (file)
@@ -135,6 +135,8 @@ COUNTRY_GREECE=Griechenland
 COUNTRY_ITALIA=Italien
 COUNTRY_NETHERLANDS=Niederlande
 COUNTRY_PHILIPPINES=Philippinen
+COUNTRY_POLAND=Polen
+COUNTRY_SWEDEN=Schweden
 COUNTRY_TURKEY=T\u00fcrkei
 COUNTRY_THAILAND=Thailand
 COUNTRY_UNITED_STATES_OF_AMERICA=U.S.A.
@@ -576,7 +578,7 @@ ADMIN_COUNTRY_PHONE_CODE_REQUIRED=Bitte geben Sie die Vorwahl dieses Landes ein
 ADMIN_COUNTRY_EXTERNAL_DIAL_PREFIX_REQUIRED=Bitte geben Sie die Vorwahl f\u00fcr Gespr\u00e4che ausserhalb des Ortes ein (meistens 0).
 ADMIN_COUNTRY_I18N_KEY_REQUIRED=Bitte geben Sie den Schl\u00fcssel f\u00fcr das Sprachpaket ein (z.B. COUNTRY_GERMANY f\u00fcr Deutschland).
 ADMIN_COUNTRY_CODE_REQUIRED=Bitte geben Sie den L\u00e4ndercode ein (z.B. DE f\u00fcr Deutschland).
-ADMIN_COUNTRY_ABORAD_DIAL_PREFIX_REQUIRED=Bitte geben Sie die Vorwahl f\u00fcr Auslandsgespr\u00e4che ein (z.B. + oder 00).
+ADMIN_COUNTRY_ABROAD_DIAL_PREFIX_REQUIRED=Bitte geben Sie die Vorwahl f\u00fcr Auslandsgespr\u00e4che ein (z.B. + oder 00).
 ADMIN_MOBILE_PROVIDER_DIAL_PREFIX_REQUIRED=Bitte geben Sie die Vorwahl ohne f\u00fchrende Null f\u00fcr den Mobilfunkanbieter ein (z.B. 177 f\u00fcr E+).
 USER_LOGIN_MUST_CHANGE_PASSWORD=Sie m\u00fcssen Ihr Passwort \u00e4ndern. Dies darf nicht mit dem aktuellen \u00fcbereinstimmen.
 ADMIN_LOGOUT_TITLE=Aus dem Administrationsbereich ausloggen
index 37d3e8bbe8aea5a8bb051ec938ca87d915fce292..5c6a3c164aabccd3f0b8b78c7a545b445d6bfd48 100644 (file)
@@ -135,6 +135,8 @@ COUNTRY_GREECE=Greece
 COUNTRY_ITALIA=Italia
 COUNTRY_NETHERLANDS=Netherlands
 COUNTRY_PHILIPPINES=Philippines
+COUNTRY_POLAND=Poland
+COUNTRY_SWEDEN=Sweden
 COUNTRY_THAILAND=Thailand
 COUNTRY_TURKEY=Turkey
 COUNTRY_UNITED_STATES_OF_AMERICA=U.S.A.
@@ -557,7 +559,7 @@ ADMIN_COUNTRY_PHONE_CODE_REQUIRED=Please enter dial prefix for this country (e.g
 ADMIN_COUNTRY_EXTERNAL_DIAL_PREFIX_REQUIRED=Please enter dial prefix for calls outside the current city.
 ADMIN_COUNTRY_I18N_KEY_REQUIRED=Please enter the key for the language package (e.g. COUNTRY_USA for U.S.A.).
 ADMIN_COUNTRY_CODE_REQUIRED=Please enter country code (e.g. US for U.S.A.).
-ADMIN_COUNTRY_ABORAD_DIAL_PREFIX_REQUIRED=Please enter dial prefix for abroad calls (e.g. + or 00).
+ADMIN_COUNTRY_ABROAD_DIAL_PREFIX_REQUIRED=Please enter dial prefix for abroad calls (e.g. + or 00).
 ADMIN_MOBILE_PROVIDER_DIAL_PREFIX_REQUIRED=Please enter dial prefix for mobile provider.
 USER_LOGIN_MUST_CHANGE_PASSWORD=Please change your password. It must not match with your current one.
 ADMIN_LOGOUT_TITLE=Logout from administration area
index 697a802ffd593f5f3c9814398b34d2bb4e287a9c..cf0dee8117bddb6728167714fca707258e9e152b 100644 (file)
                        <to-view-id>/admin/basic_data/admin_basic_data_assign_owner.xhtml</to-view-id>
                </navigation-case>
                <navigation-case>
-                       <from-outcome>admin_show_contact</from-outcome>
-                       <to-view-id>/admin/contact/admin_contact_show.xhtml</to-view-id>
+                       <from-outcome>admin_show_employee</from-outcome>
+                       <to-view-id>/admin/employee/admin_employee_show.xhtml</to-view-id>
                </navigation-case>
                <navigation-case>
                        <from-outcome>admin_assign_basic_data_employee</from-outcome>
diff --git a/web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl b/web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl
deleted file mode 100644 (file)
index 769aef8..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:core="http://mxchange.org/jsf/core/widgets"
-       xmlns:validator="http://mxchange.org/jsf/core/validators"
-       xmlns:f="http://xmlns.jcp.org/jsf/core"
-       xmlns:h="http://xmlns.jcp.org/jsf/html"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-       xmlns:p="http://primefaces.org/ui"
-       >
-       <p:fieldset
-               legend="#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND}"
-               title="#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND_TITLE}"
-               rendered="#{empty rendered or rendered}"
-               >
-               <p:panelGrid
-                       layout="grid"
-                       columns="2"
-                       columnClasses="ui-grid-col-4,ui-grid-col-8"
-                       styleClass="ui-noborder"
-                       >
-                       <p:outputLabel for="personalTitle" value="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}" />
-                       <core:outputPersonalTitleSelectionBox targetController="#{adminContactController}" allowEmptyRequiredData="#{allowEmptyRequiredData}" />
-
-                       <p:outputLabel for="firstName" value="#{msg.ADMIN_PERSONAL_DATA_FIRST_NAME}" />
-                       <p:inputText
-                               id="firstName"
-                               size="10"
-                               maxlength="255"
-                               value="#{adminContactController.firstName}"
-                               required="#{empty allowEmptyRequiredData or not allowEmptyRequiredData}"
-                               requiredMessage="#{msg.ADMIN_CONTACT_DATA_FIRST_NAME_REQUIRED}"
-                               />
-
-                       <p:outputLabel for="title" value="#{msg.ADMIN_PERSONAL_DATA_TITLE}" />
-                       <p:inputText
-                               id="title"
-                               size="5"
-                               maxlength="255"
-                               value="#{adminContactController.academicTitle}"
-                               />
-
-                       <p:outputLabel for="familyName" value="#{msg.ADMIN_PERSONAL_DATA_FAMILY_NAME}" />
-                       <p:inputText
-                               id="familyName"
-                               size="10"
-                               maxlength="255"
-                               value="#{adminContactController.familyName}"
-                               required="#{empty allowEmptyRequiredData or not allowEmptyRequiredData}"
-                               requiredMessage="#{msg.ADMIN_CONTACT_DATA_FAMILY_NAME_REQUIRED}"
-                               />
-
-                       <p:outputLabel for="street" value="#{msg.ADMIN_DATA_STREET_NAME}" />
-                       <p:inputText
-                               id="street"
-                               size="20"
-                               maxlength="255"
-                               value="#{adminContactController.street}"
-                               />
-
-                       <p:outputLabel for="houseNumber" value="#{msg.ADMIN_DATA_HOUSE_NUMBER}" />
-                       <p:inputText
-                               id="houseNumber"
-                               size="3"
-                               maxlength="5"
-                               value="#{adminContactController.houseNumber}"
-                               validatorMessage="#{msg.ENTERED_HOUSE_NUMBER_INVALID}"
-                               >
-                               <f:validateLongRange minimum="1" maximum="500" />
-                       </p:inputText>
-
-                       <p:outputLabel for="houseNumberExtension" value="#{msg.ADMIN_DATA_HOUSE_NUMBER_EXTENSION}" />
-                       <p:inputText id="houseNumberExtension" size="2" maxlength="2" value="#{adminContactController.houseNumberExtension}" />
-
-                       <p:outputLabel for="zipCode" value="#{msg.DATA_ZIP_CODE}" />
-                       <p:inputText id="zipCode" size="5" maxlength="6" value="#{adminContactController.zipCode}" validatorMessage="#{msg.ENTERED_ZIP_CODE_INVALID}">
-                               <f:validateLongRange minimum="1" maximum="99999" />
-                       </p:inputText>
-
-                       <p:outputLabel for="city" value="#{msg.ADMIN_DATA_CITY}" />
-                       <p:inputText id="city" size="10" maxlength="255" value="#{adminContactController.city}" />
-
-                       <p:outputLabel for="country" value="#{msg.ADMIN_SELECT_COUNTRY}" />
-                       <core:outputCountrySelector
-                               id="country"
-                               value="#{adminContactController.contactCountry}"
-                               required="#{empty allowEmptyRequiredData or not allowEmptyRequiredData}"
-                               requiredMessage="#{msg.ADMIN_SELECT_CONTACT_COUNTRY_REQUIRED}"
-                               />
-
-                       <p:outputLabel for="landLineCountry" value="#{msg.ADMIN_PERSONAL_DATA_PHONE_NUMBER}" />
-                       <core:inputLandLineNumberPanelGrid targetController="#{adminContactController}" />
-
-                       <p:outputLabel for="faxCountry" value="#{msg.ADMIN_PERSONAL_DATA_FAX_NUMBER}" />
-                       <core:inputFaxNumberPanelGrid targetController="#{adminContactController}" />
-
-                       <p:outputLabel for="mobileNumber" value="#{msg.ADMIN_PERSONAL_DATA_MOBILE_NUMBER}" />
-                       <core:inputMobileNumberPanelGrid targetController="#{adminContactController}" />
-
-                       <p:outputLabel for="emailAddress" value="#{msg.DATA_EMAIL_ADDRESS}" />
-                       <p:inputText id="emailAddress" size="20" maxlength="255" value="#{adminContactController.emailAddress}" validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}">
-                               <validator:emailAddressValidator allowEmptyRequiredData="#{allowEmptyRequiredData}" />
-                       </p:inputText>
-
-                       <p:outputLabel for="contactBirthday" value="#{msg.ADMIN_PERSONAL_DATA_BIRTHDAY}" />
-                       <p:calendar
-                               id="contactBirthday"
-                               value="#{contactController.birthday}"
-                               title="#{msg.ADMIN_PERSONAL_DATA_BIRTHDAY_TITLE}"
-                               pattern="#{msg.DATE_PATTERN}"
-                               navigator="true"
-                               />
-
-                       <p:outputLabel for="contactComment" value="#{msg.ADMIN_PERSONAL_DATA_COMMENT}" />
-                       <p:inputTextarea id="contactComment" value="#{adminContactController.comment}" rows="7" cols="35" />
-               </p:panelGrid>
-       </p:fieldset>
-
-       <h:panelGroup styleClass="para notice" layout="block">
-               <ul>
-                       <li>
-                               <h:outputText value="#{msg.ADMIN_CONTACT_DATA_EMAIL_ADDRESS_NOTICE}" />
-                       </li>
-               </ul>
-       </h:panelGroup>
-</ui:composition>
index 8731f8cca83248cdeda4fd52f6bf061f0c03e372..5185f53461ef8391fdf46f4f366a2031b884acaf 100644 (file)
@@ -9,13 +9,12 @@
        <p:selectOneRadio
                id="personalTitle"
                value="#{targetController.personalTitle}"
-               required="#{(empty allowEmptyRequiredData or not allowEmptyRequiredData) and featureController.isFeatureEnabled(targetController.controllerType.concat('_personal_title'))}"
+               required="true"
                requiredMessage="#{msg.FIELD_PERSONAL_TITLE_REQUIRED}"
-               rendered="#{empty rendered or rendered == true}"
                >
 
                <f:selectItems
-                       value="#{genderController.selectableGenders}"
+                       value="#{dataController.personalTitles}"
                        var="personalTitle"
                        itemValue="#{personalTitle}"
                        itemLabel="#{msg[personalTitle.messageKey]}"
index 2864d093a537ad3c326a82aab1b39af4fab8a0b6..2e16c29d3d8c6e3720e7a0cdea5d42a897dc7665 100644 (file)
                                value="#{adminBranchOfficeActionController.branchEmailAddress}"
                                validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}"
                                >
-                               <validator:branchOfficeEmailAddressValidator allowEmptyRequiredData="true" />
+                               <validator:branchOfficeEmailAddressValidator />
                        </p:inputText>
 
                        <p:outputLabel for="landLineCountry" value="#{msg.ADMIN_ENTER_BRANCH_OFFICE_LAND_LINE_NUMBER}" />
diff --git a/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl b/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl
new file mode 100644 (file)
index 0000000..568fcf7
--- /dev/null
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:core="http://mxchange.org/jsf/core/widgets"
+       xmlns:validator="http://mxchange.org/jsf/core/validators"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:p="http://primefaces.org/ui"
+       >
+       <p:fieldset
+               legend="#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND}"
+               title="#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND_TITLE}"
+               >
+               <p:panelGrid
+                       layout="grid"
+                       columns="2"
+                       columnClasses="ui-grid-col-4,ui-grid-col-8"
+                       styleClass="ui-noborder"
+                       >
+                       <p:outputLabel for="personalTitle" value="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}" />
+                       <core:outputPersonalTitleSelectionBox targetController="#{adminContactController}" />
+
+                       <p:outputLabel for="firstName" value="#{msg.ADMIN_PERSONAL_DATA_FIRST_NAME}" />
+                       <p:inputText
+                               id="firstName"
+                               size="10"
+                               maxlength="255"
+                               value="#{adminContactController.firstName}"
+                               required="true"
+                               requiredMessage="#{msg.ADMIN_CONTACT_DATA_FIRST_NAME_REQUIRED}"
+                               />
+
+                       <p:outputLabel for="title" value="#{msg.ADMIN_PERSONAL_DATA_TITLE}" />
+                       <p:inputText
+                               id="title"
+                               size="5"
+                               maxlength="255"
+                               value="#{adminContactController.academicTitle}"
+                               />
+
+                       <p:outputLabel for="familyName" value="#{msg.ADMIN_PERSONAL_DATA_FAMILY_NAME}" />
+                       <p:inputText
+                               id="familyName"
+                               size="10"
+                               maxlength="255"
+                               value="#{adminContactController.familyName}"
+                               required="true"
+                               requiredMessage="#{msg.ADMIN_CONTACT_DATA_FAMILY_NAME_REQUIRED}"
+                               />
+
+                       <p:outputLabel for="street" value="#{msg.ADMIN_DATA_STREET_NAME}" />
+                       <p:inputText
+                               id="street"
+                               size="20"
+                               maxlength="255"
+                               value="#{adminContactController.street}"
+                               />
+
+                       <p:outputLabel for="houseNumber" value="#{msg.ADMIN_DATA_HOUSE_NUMBER}" />
+                       <p:inputText
+                               id="houseNumber"
+                               size="3"
+                               maxlength="5"
+                               value="#{adminContactController.houseNumber}"
+                               validatorMessage="#{msg.ENTERED_HOUSE_NUMBER_INVALID}"
+                               >
+                               <f:validateLongRange minimum="1" maximum="500" />
+                       </p:inputText>
+
+                       <p:outputLabel for="houseNumberExtension" value="#{msg.ADMIN_DATA_HOUSE_NUMBER_EXTENSION}" />
+                       <p:inputText id="houseNumberExtension" size="2" maxlength="2" value="#{adminContactController.houseNumberExtension}" />
+
+                       <p:outputLabel for="zipCode" value="#{msg.DATA_ZIP_CODE}" />
+                       <p:inputText id="zipCode" size="5" maxlength="6" value="#{adminContactController.zipCode}" validatorMessage="#{msg.ENTERED_ZIP_CODE_INVALID}">
+                               <f:validateLongRange minimum="1" maximum="99999" />
+                       </p:inputText>
+
+                       <p:outputLabel for="city" value="#{msg.ADMIN_DATA_CITY}" />
+                       <p:inputText id="city" size="10" maxlength="255" value="#{adminContactController.city}" />
+
+                       <p:outputLabel for="country" value="#{msg.ADMIN_SELECT_COUNTRY}" />
+                       <core:outputCountrySelector
+                               id="country"
+                               value="#{adminContactController.contactCountry}"
+                               required="true"
+                               requiredMessage="#{msg.ADMIN_SELECT_CONTACT_COUNTRY_REQUIRED}"
+                               />
+
+                       <p:outputLabel for="landLineCountry" value="#{msg.ADMIN_PERSONAL_DATA_PHONE_NUMBER}" />
+                       <core:inputLandLineNumberPanelGrid targetController="#{adminContactController}" />
+
+                       <p:outputLabel for="faxCountry" value="#{msg.ADMIN_PERSONAL_DATA_FAX_NUMBER}" />
+                       <core:inputFaxNumberPanelGrid targetController="#{adminContactController}" />
+
+                       <p:outputLabel for="mobileNumber" value="#{msg.ADMIN_PERSONAL_DATA_MOBILE_NUMBER}" />
+                       <core:inputMobileNumberPanelGrid targetController="#{adminContactController}" />
+
+                       <p:outputLabel for="emailAddress" value="#{msg.DATA_EMAIL_ADDRESS}" />
+                       <p:inputText id="emailAddress" size="20" maxlength="255" value="#{adminContactController.emailAddress}" validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}">
+                               <validator:emailAddressValidator allowEmptyRequiredData="true" />
+                       </p:inputText>
+
+                       <p:outputLabel for="contactBirthday" value="#{msg.ADMIN_PERSONAL_DATA_BIRTHDAY}" />
+                       <p:calendar
+                               id="contactBirthday"
+                               value="#{contactController.birthday}"
+                               title="#{msg.ADMIN_PERSONAL_DATA_BIRTHDAY_TITLE}"
+                               pattern="#{msg.DATE_PATTERN}"
+                               navigator="true"
+                               />
+
+                       <p:outputLabel for="contactComment" value="#{msg.ADMIN_PERSONAL_DATA_COMMENT}" />
+                       <p:inputTextarea id="contactComment" value="#{adminContactController.comment}" rows="7" cols="35" />
+               </p:panelGrid>
+       </p:fieldset>
+
+       <h:panelGroup styleClass="para notice" layout="block">
+               <ul>
+                       <li>
+                               <h:outputText value="#{msg.ADMIN_CONTACT_DATA_EMAIL_ADDRESS_NOTICE}" />
+                       </li>
+               </ul>
+       </h:panelGroup>
+</ui:composition>
index 5ba60c7f5dd74f7f507a01fe7d5cc144eed018a9..8cf9e48d615d164ad12febeeb9faf427b149c41f 100644 (file)
                                </div>
 
                                <div class="table-right-medium">
-                                       <p:inputText id="countryAbroadDialPrefix" size="2" maxlength="10" value="#{adminCountryController.countryAbroadDialPrefix}" required="true" requiredMessage="#{msg.ADMIN_COUNTRY_ABORAD_DIAL_PREFIX_REQUIRED}">
+                                       <p:inputText
+                                               id="countryAbroadDialPrefix"
+                                               size="2"
+                                               maxlength="10"
+                                               value="#{adminCountryController.countryAbroadDialPrefix}"
+                                               required="true"
+                                               requiredMessage="#{msg.ADMIN_COUNTRY_ABROAD_DIAL_PREFIX_REQUIRED}"
+                                               >
                                                <f:validator validatorId="AbroadDialValidator" />
                                        </p:inputText>
                                </div>
index 3efb0ef94e5033d256e61dc986e267947581b0c7..9d9dede6f1cec3863d593ceabffc0ff43c1fae08 100644 (file)
                        </p:selectOneMenu>
 
                        <p:outputLabel for="employeeEmailAddress" value="#{msg.ADMIN_ENTER_EMPLOYEE_EMAIL_ADDRESS}" />
-                       <p:inputText id="employeeEmailAddress" size="20" maxlength="255" value="#{adminEmployeeController.employeeEmailAddress}" validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}">
-                               <validator:employeeEmailAddressValidator allowEmptyRequiredData="true" />
+                       <p:inputText
+                               id="employeeEmailAddress"
+                               size="40"
+                               maxlength="255"
+                               value="#{adminEmployeeController.employeeEmailAddress}"
+                               validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}"
+                               >
+                               <validator:employeeEmailAddressValidator />
                        </p:inputText>
 
                        <p:outputLabel for="employeeStaffNumber" value="#{msg.ADMIN_ENTER_EMPLOYEE_STAFF_NUMBER}" />
index 39970174a4109ffaa83a6be0eb7fdd31a963430c..3b54506d15141404cfb53aad4858f7befbda9e01 100644 (file)
@@ -79,7 +79,7 @@
                                value="#{adminHeadquarterActionController.headquarterEmailAddress}"
                                validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}"
                                >
-                               <validator:headquarterEmailAddressValidator allowEmptyRequiredData="true" />
+                               <validator:headquarterEmailAddressValidator />
                        </p:inputText>
 
                        <p:outputLabel for="landLineCountry" value="#{msg.ADMIN_ENTER_HEADQUARTER_LAND_LINE_NUMBER}" />
index b50b5526ff7d1157360e4e3f29e8183cc95f26bd..7d4fb5320ac3cec72695f0473cadab804c2be270 100644 (file)
@@ -39,48 +39,24 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
                <validator>
                        <validator-id>BasicDataEmailAddressValidator</validator-id>
                </validator>
-               <attribute>
-                       <description>Whether email address is allowed to be empty.</description>
-                       <name>allowEmptyRequiredData</name>
-                       <type>java.lang.Boolean</type>
-                       <required>false</required>
-               </attribute>
        </tag>
        <tag>
                <tag-name>branchOfficeEmailAddressValidator</tag-name>
                <validator>
                        <validator-id>BranchOfficeEmailAddressValidator</validator-id>
                </validator>
-               <attribute>
-                       <description>Whether email address is allowed to be empty.</description>
-                       <name>allowEmptyRequiredData</name>
-                       <type>java.lang.Boolean</type>
-                       <required>false</required>
-               </attribute>
        </tag>
        <tag>
                <tag-name>employeeEmailAddressValidator</tag-name>
                <validator>
                        <validator-id>EmployeeEmailAddressValidator</validator-id>
                </validator>
-               <attribute>
-                       <description>Whether email address is allowed to be empty.</description>
-                       <name>allowEmptyRequiredData</name>
-                       <type>java.lang.Boolean</type>
-                       <required>false</required>
-               </attribute>
        </tag>
        <tag>
                <tag-name>headquarterEmailAddressValidator</tag-name>
                <validator>
                        <validator-id>HeadquarterEmailAddressValidator</validator-id>
                </validator>
-               <attribute>
-                       <description>Whether email address is allowed to be empty.</description>
-                       <name>allowEmptyRequiredData</name>
-                       <type>java.lang.Boolean</type>
-                       <required>false</required>
-               </attribute>
        </tag>
        <tag>
                <tag-name>urlValidator</tag-name>
index b2e5cbfed6c61d5d331bcafaec9f77e4fc13f03b..73d86d1d3d9f6b0a7aef2bdce08e147f1ae91e34 100644 (file)
@@ -66,18 +66,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
                <tag-name>outputPersonalTitleSelectionBox</tag-name>
                <description>This tag renders a selection box for user contact's personal title (Mr./Mrs.).</description>
                <source>resources/tags/input/selection_box/personal_title_selection_box.tpl</source>
-               <attribute>
-                       <name>allowEmptyRequiredData</name>
-                       <description>Whether allow the personal title to be left empty. This might be the case when you create a user and want to select a contact from a selection box. EL code resolving to a boolean may be allowed here.</description>
-                       <required>false</required>
-                       <type>java.lang.Boolean</type>
-               </attribute>
-               <attribute>
-                       <name>rendered</name>
-                       <description>Whether this tag is being rendered by JSF engine (default: true).</description>
-                       <required>false</required>
-                       <type>java.lang.Boolean</type>
-               </attribute>
                <attribute>
                        <name>targetController</name>
                        <description>A target backing bean (EL code resolving into it) extending at least BaseFacesBean where to set the data in.</description>
@@ -86,23 +74,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
                        <type>org.mxchange.jcoreee.bean.faces.BaseFacesBean</type>
                </attribute>
        </tag>
-       <tag>
-               <tag-name>outputAdminContactDataFormFields</tag-name>
-               <description>This tag renders a fieldset for administrative purposes of contact data.</description>
-               <source>resources/tags/admin/form_data/contact/admin_form_contact_data.tpl</source>
-               <attribute>
-                       <name>allowEmptyRequiredData</name>
-                       <description>Whether allow the personal title to be left empty. This might be the case when you create a user and want to select a contact from a selection box. EL code resolving to a boolean may be allowed here.</description>
-                       <required>false</required>
-                       <type>java.lang.Boolean</type>
-               </attribute>
-               <attribute>
-                       <name>rendered</name>
-                       <description>Whether this tag is being rendered by JSF engine (default: true).</description>
-                       <required>false</required>
-                       <type>java.lang.Boolean</type>
-               </attribute>
-       </tag>
        <tag>
                <tag-name>outputAdminFaxDataFormFields</tag-name>
                <description>This tag renders a fieldset for administrative purposes of fax data.</description>
index 606fc527c9118846f309f3a14210f2d1a381e96b..e6f5114cbc19d8c545847865db0d99c8c9659692 100644 (file)
                                                                value="#{adminBasicCompanyDataController.companyEmailAddress}"
                                                                validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}"
                                                                >
-                                                               <validator:basicDataEmailAddressValidator allowEmptyRequiredData="true" />
+                                                               <validator:basicDataEmailAddressValidator />
                                                        </p:inputText>
 
                                                        <p:outputLabel for="companyLogo" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_LOGO}" />
index d2b697b8cf115977e2fe96aefa57573546c03294..0dc8a1a3b738ce7d14a66c443b72cf4a785e5b55 100644 (file)
@@ -46,7 +46,7 @@
                                        <h:outputText value="#{msg.ADMIN_CONTACT_PERSONAL_DATA_MINIMUM_NOTICE}" />
                                </div>
 
-                               <core:outputAdminContactDataFormFields allowEmptyRequiredData="true" />
+                               <ui:include src="/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl" />
 
                                <p:panelGrid columns="2" layout="grid">
                                        <p:commandButton
index 2510aaec56eaa893a33ef7df59606552a770b709..cc23c1196cca68e4d6845a575bf139ef9f9c858c 100644 (file)
 
                                <h:outputText value="#{msg.ADMIN_ADD_CONTACT_MINIMUM_DATA}" />
 
-                               <core:outputAdminContactDataFormFields allowEmptyRequiredData="true" />
+                               <ui:include src="/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl" />
 
                                <f:facet name="footer">
                                        <p:panelGrid columns="2" layout="grid">
index 425ae0d400819b8a470e7a09f4b173061a14a35d..b807d4576824b6542761cdc71cb408789767848a 100644 (file)
                                                <h:outputText value="#{msg.ADMIN_USER_PERSONAL_DATA_MINIMUM_NOTICE}" />
                                        </h:panelGroup>
 
-                                       <core:outputAdminContactDataFormFields allowEmptyRequiredData="true" />
+                                       <ui:include src="/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl" />
                                </h:panelGroup>
 
                                <f:facet name="footer">