]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Thu, 23 Apr 2020 00:29:42 +0000 (02:29 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 10 Jun 2020 17:32:33 +0000 (19:32 +0200)
- got rid of admin_form_basic_data.tpl, now moved back to original view, I guess
  I will do that for all forms, which would lead to "duplicate" forms elements
  butter with no targetController which was never resolvable anyway.
- added showEmailAddress boolean flag to many renderFoo() methods to whether
  show email address which is mostly not wanted in selection boxes ...
- added companyRoadNumber to basic-data backing bean and proper forms/list view
- in converters/validators now the FOO_LIST_CONTROLLER static instance shall
  always be initialized directly before the try{} block

Signed-off-by: Roland Häder <roland@mxchange.org>
31 files changed:
src/java/org/mxchange/jjobs/beans/business/basicdata/JobsAdminBasicDataWebRequestBean.java
src/java/org/mxchange/jjobs/beans/business/basicdata/list/JobsBasicDataListWebViewBean.java
src/java/org/mxchange/jjobs/beans/business/basicdata/list/JobsBasicDataListWebViewController.java
src/java/org/mxchange/jjobs/beans/helper/JobsWebViewHelperBean.java
src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java
src/java/org/mxchange/jjobs/beans/user/password/JobsUserPasswordWebRequestBean.java
src/java/org/mxchange/jjobs/beans/user/register/JobsUserRegisterWebRequestBean.java
src/java/org/mxchange/jjobs/converter/business/basicdata/JobsBasicCompanyDataConverter.java
src/java/org/mxchange/jjobs/converter/business/branchoffice/JobsBranchOfficeConverter.java
src/java/org/mxchange/jjobs/converter/business/company_employee/JobsEmployeeConverter.java
src/java/org/mxchange/jjobs/converter/business/department/JobsDepartmentConverter.java
src/java/org/mxchange/jjobs/converter/business/headquarter/JobsHeadquarterConverter.java
src/java/org/mxchange/jjobs/converter/business/opening_time/JobsCompanyOpeningTimeConverter.java
src/java/org/mxchange/jjobs/converter/contact/JobsContactConverter.java
src/java/org/mxchange/jjobs/converter/country/JobsCountryConverter.java
src/java/org/mxchange/jjobs/converter/fax/JobsFaxNumberConverter.java
src/java/org/mxchange/jjobs/converter/landline/JobsLandLineNumberConverter.java
src/java/org/mxchange/jjobs/converter/mobile/JobsMobileNumberConverter.java
src/java/org/mxchange/jjobs/converter/mobileprovider/JobsMobileProviderConverter.java
src/java/org/mxchange/jjobs/converter/user/JobsUserConverter.java
src/java/org/mxchange/localization/generic_de_DE.properties
src/java/org/mxchange/localization/generic_en_US.properties
web/WEB-INF/templates/admin/branch_office/admin_form_branch_office_data.tpl
web/WEB-INF/templates/admin/department/admin_form_department_data.tpl
web/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl
web/WEB-INF/templates/admin/headquarter/admin_form_headquarter.tpl
web/admin/basic_data/admin_basic_data_list.xhtml
web/admin/branch_office/admin_branch_office_list.xhtml
web/admin/department/admin_department_list.xhtml
web/admin/employee/admin_employee_list.xhtml
web/admin/headquarter/admin_headquarter_list.xhtml

index 197e4b600f8399ead497ceda774516ee153d6196..42117c2d8f07e664a6877b0ee09cb271a13baf4f 100644 (file)
@@ -96,6 +96,11 @@ public class JobsAdminBasicDataWebRequestBean extends BaseJobsBean implements Jo
         */
        private String companyName;
 
+       /**
+        * Company's road number
+        */
+       private String companyRoadNumber;
+
        /**
         * Company short name
         */
@@ -181,15 +186,28 @@ public class JobsAdminBasicDataWebRequestBean extends BaseJobsBean implements Jo
                basicData.setCompanyFounder(this.getCompanyFounder());
                basicData.setCompanyHeadquarterData(this.getCompanyHeadQuarter());
                basicData.setCompanyName(this.getCompanyName());
+               basicData.setCompanyRoadNumber(this.getCompanyRoadNumber());
                basicData.setCompanyTaxNumber(this.getCompanyTaxNumber());
                basicData.setCompanyUserOwner(this.getCompanyUserOwner());
                basicData.setCompanyWebsiteUrl(this.getCompanyWebsiteUrl());
 
                // Set logo instance
                // @TODO basicData.setCompanyLogo();
-               // Generate phone number
-               DialableLandLineNumber landLine = new LandLineNumber(this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
-               DialableFaxNumber fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
+               // Init varibables
+               DialableLandLineNumber landLine = null;
+               DialableFaxNumber fax = null;
+
+               // Are all 3 fields set?
+               if (this.getLandLineAreaCode() != null && this.getLandLineCountry() != null && this.getLandLineNumber() != null) {
+                       // Initialize land number number instance
+                       landLine = new LandLineNumber(this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
+               }
+
+               // Are all 3 fields set?
+               if (this.getFaxAreaCode() != null && this.getFaxCountry() != null && this.getFaxNumber() != null) {
+                       // Initialzie fax number instance
+                       fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
+               }
 
                // Don't set null or wrong references
                if ((landLine instanceof DialableLandLineNumber) && (landLine.getPhoneCountry() instanceof Country) && (this.getLandLineAreaCode() != null) && (this.getLandLineNumber() != null) && (this.getLandLineAreaCode() > 0) && (this.getLandLineNumber() > 0)) {
@@ -233,17 +251,20 @@ public class JobsAdminBasicDataWebRequestBean extends BaseJobsBean implements Jo
                        basicData.setCompanyFaxNumber(fax);
                }
 
+               // Init variable
+               final BasicData updatedBasicData;
+
                // Now try to send to EJB and get an updated version back
                try {
                        // Try it
-                       final BasicData updatedBasicData = this.adminBasicCompanyDataBean.addBusinessBasicData(basicData);
-
-                       // Fire event
-                       this.businessDataAddedEvent.fire(new AdminAddedBusinessBasicDataEvent(updatedBasicData));
+                       updatedBasicData = this.adminBasicCompanyDataBean.addBusinessBasicData(basicData);
                } catch (final BasicDataAlreadyAddedException e) {
                        // Does already exist
                        throw new FacesException(e);
                }
+
+               // Fire event
+               this.businessDataAddedEvent.fire(new AdminAddedBusinessBasicDataEvent(updatedBasicData));
        }
 
        /**
@@ -354,6 +375,24 @@ public class JobsAdminBasicDataWebRequestBean extends BaseJobsBean implements Jo
                this.companyName = companyName;
        }
 
+       /**
+        * Getter for company's road number
+        * <p>
+        * @return Company's road number
+        */
+       public String getCompanyRoadNumber () {
+               return this.companyRoadNumber;
+       }
+
+       /**
+        * Setter for company's road number
+        * <p>
+        * @param companyRoadNumber Company's road number
+        */
+       public void setCompanyRoadNumber (final String companyRoadNumber) {
+               this.companyRoadNumber = companyRoadNumber;
+       }
+
        /**
         * Getter for company short name
         * <p>
index dd5898ecb236da0954403538700a55dfe1266a06..c2e2a4cbb8647b9fc4f72bea4d4cda12748d3147 100644 (file)
@@ -253,6 +253,34 @@ public class JobsBasicDataListWebViewBean extends BaseJobsBean implements JobsBa
                return isFound;
        }
 
+       @Override
+       public boolean isCompanyRoadNumberUsed (final String companyRoadNumber) {
+               // Validate parameter
+               if (null == companyRoadNumber) {
+                       // Throw NPE
+                       throw new NullPointerException("companyRoadNumber is null"); //NOI18N
+               } else if (companyRoadNumber.isEmpty()) {
+                       // Throw IAE
+                       throw new IllegalArgumentException("companyRoadNumber is empty"); //NOI18N
+               }
+
+               // Default is not found
+               boolean isFound = false;
+
+               // Check all entries
+               for (final BasicData basicData : this.getAllBasicData()) {
+                       // Is same company name?
+                       if (Objects.equals(basicData.getCompanyRoadNumber(), companyRoadNumber)) {
+                               // Found it
+                               isFound = true;
+                               break;
+                       }
+               }
+
+               // Return flag
+               return isFound;
+       }
+
        @Override
        public Boolean isCompanyShortNameUsed (final String companyShortName) {
                // Validate parameter
index d83f47d546760c064a6691fad128317ab81c40f5..ec7dae8973b3e36ec99d017005cb620ae3e76cd9 100644 (file)
@@ -27,6 +27,15 @@ import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
  */
 public interface JobsBasicDataListWebViewController extends Serializable {
 
+       /**
+        * Checks whether given company's road number is already used.
+        * <p>
+        * @param companyRoadNumber Company's road number
+        * <p>
+        * @return Whether it is already in use
+        */
+       boolean isCompanyRoadNumberUsed (final String companyRoadNumber);
+
        /**
         * Retrieves a single business data entity for given id number or throws a
         * proper exception if not found.
index c811a4247f2b7f734f3f6a643cafde175ce6fc1a..4c6361f4ac4aabc4a60e36ef9eecdf239eea576d 100644 (file)
@@ -443,12 +443,13 @@ public class JobsWebViewHelperBean extends BaseJobsBean implements JobsWebViewHe
        /**
         * Renders data of basic company data
         * <p>
-        * @param basicData    Basic company data instance
-        * @param useShortName Whether to use short name or long name of company
+        * @param basicData        Basic company data instance
+        * @param useShortName     Whether to use short name or long name of company
+        * @param showEmailAddress Whether render email address
         * <p>
         * @return Basic company data as string
         */
-       public String renderBasicData (final BasicData basicData, final boolean useShortName) {
+       public String renderBasicData (final BasicData basicData, final boolean useShortName, final boolean showEmailAddress) {
                // Default is empty string, so let's get started
                final StringBuilder sb = new StringBuilder(30);
 
@@ -464,7 +465,7 @@ public class JobsWebViewHelperBean extends BaseJobsBean implements JobsWebViewHe
                        }
 
                        // Is email address set?
-                       if (basicData.getCompanyEmailAddress() != null) {
+                       if (showEmailAddress && basicData.getCompanyEmailAddress() != null) {
                                // Add it
                                sb.append(", ").append(basicData.getCompanyEmailAddress()); //NOI18N
                        }
@@ -484,11 +485,12 @@ public class JobsWebViewHelperBean extends BaseJobsBean implements JobsWebViewHe
         * Returns the branch office's full address. If null is provided, an empty
         * string is returned.
         * <p>
-        * @param branchOffice Branch office instance
+        * @param branchOffice     Branch office instance
+        * @param showEmailAddress Whether render email address
         * <p>
         * @return Branch office's address
         */
-       public String renderBranchOffice (final BranchOffice branchOffice) {
+       public String renderBranchOffice (final BranchOffice branchOffice, final boolean showEmailAddress) {
                // Default is empty string, so let's get started
                final StringBuilder sb = new StringBuilder(30);
 
@@ -510,7 +512,7 @@ public class JobsWebViewHelperBean extends BaseJobsBean implements JobsWebViewHe
                        }
 
                        // Yes, then append all data
-                       sb.append(this.renderBasicData(branchOffice.getBranchCompany(), true));
+                       sb.append(this.renderBasicData(branchOffice.getBranchCompany(), true, showEmailAddress));
                        sb.append(", "); //NOI18N
                        sb.append(branchOffice.getBranchStreet());
                        sb.append(" "); //NOI18N
@@ -582,11 +584,12 @@ public class JobsWebViewHelperBean extends BaseJobsBean implements JobsWebViewHe
         * Returns the department's name and name of assigned company. If null is
         * provided, an empty string is returned.
         * <p>
-        * @param department Department instance
+        * @param department       Department instance
+        * @param showEmailAddress Whether to render email address
         * <p>
         * @return Department's full name
         */
-       public String renderDepartment (final Department department) {
+       public String renderDepartment (final Department department, final boolean showEmailAddress) {
                // Default is empty string, so let's get started
                final StringBuilder sb = new StringBuilder(10);
 
@@ -595,7 +598,7 @@ public class JobsWebViewHelperBean extends BaseJobsBean implements JobsWebViewHe
                        // Then create name
                        sb.append(this.getMessageFromBundle(department.getDepartmentI18nKey()));
                        sb.append(" ("); //NOI18N
-                       sb.append(this.renderBasicData(department.getDepartmentCompany(), true));
+                       sb.append(this.renderBasicData(department.getDepartmentCompany(), true, showEmailAddress));
                        sb.append(")"); //NOI18N
                }
 
@@ -607,11 +610,12 @@ public class JobsWebViewHelperBean extends BaseJobsBean implements JobsWebViewHe
         * Returns the employee's number, personal title, family name and name if
         * available. If null is provided, an empty string is returned.
         * <p>
-        * @param employee Employable instance
+        * @param employee         Employable instance
+        * @param showEmailAddress Whether to show email address of employee
         * <p>
         * @return A string representing an employee
         */
-       public String renderEmployee (final Employable employee) {
+       public String renderEmployee (final Employable employee, final boolean showEmailAddress) {
                // Default is empty string, so let's get started
                final StringBuilder sb = new StringBuilder(20);
 
@@ -653,7 +657,7 @@ public class JobsWebViewHelperBean extends BaseJobsBean implements JobsWebViewHe
                                }
 
                                // Add department name
-                               sb.append(this.renderDepartment(employee.getEmployeeDepartment()));
+                               sb.append(this.renderDepartment(employee.getEmployeeDepartment(), showEmailAddress));
 
                                // Only add braces when employee number is given
                                if (employee.getEmployeeNumber() != null || employee.getEmployeePersonalData() instanceof Contact) {
index 2e75075673570ef6b8c4e9a407690fce921f07dc..4a9666f2da8917e356e85fc452c7947b4a72e4ae 100644 (file)
@@ -257,26 +257,31 @@ public class JobsAdminUserWebRequestBean extends BaseJobsBean implements JobsAdm
                        return;
                }
 
+               // Init variable
+               final User updatedUser;
+
                try {
                        // Now, that all is set, call EJB
                        if (this.getContact() instanceof Contact) {
                                // Link contact with this user
-                               final User updatedUser = this.adminUserBean.linkUser(newUser);
-
-                               // Fire event
-                               this.userLinkedEvent.fire(new AdminLinkedUserEvent(updatedUser));
+                               updatedUser = this.adminUserBean.linkUser(newUser);
                        } else {
                                // Add new user
-                               final User updatedUser = this.adminUserBean.addUser(newUser);
-
-                               // Fire event
-                               this.addedUserEvent.fire(new AdminAddedUserEvent(updatedUser));
+                               updatedUser = this.adminUserBean.addUser(newUser);
                        }
                } catch (final UserNameAlreadyRegisteredException | EmailAddressAlreadyRegisteredException ex) {
                        // Throw again
                        throw new FacesException(ex);
                }
 
+               // Now, that all is set, call EJB
+               if (this.getContact() instanceof Contact) {
+                       // Fire event
+                       this.userLinkedEvent.fire(new AdminLinkedUserEvent(updatedUser));
+               } else {
+                       // Fire event
+                       this.addedUserEvent.fire(new AdminAddedUserEvent(updatedUser));
+               }
                // Clear helper
                this.setContact(null);
 
index be9c162449abae2d5c780abc43f18473877c3c36..42fa746f8e24474f374df169722aae2311582679 100644 (file)
@@ -170,15 +170,15 @@ public class JobsUserPasswordWebRequestBean extends BaseJobsBean implements Jobs
                // Set it in user
                user.setUserEncryptedPassword(encryptedPassword);
 
+               // Init variable
+               final PasswordHistory passwordHistory;
+
                try {
                        // Get base URL
                        final String baseUrl = FacesUtils.generateBaseUrl();
 
                        // All is set, then update password
-                       PasswordHistory passwordHistory = this.userBean.updateUserPassword(user, baseUrl);
-
-                       // Fire event
-                       this.userUpdatedPasswordEvent.fire(new UpdatedUserPasswordEvent(passwordHistory, this.getUserPassword()));
+                       passwordHistory = this.userBean.updateUserPassword(user, baseUrl);
                } catch (final UserNotFoundException | UserStatusUnconfirmedException | UserStatusLockedException ex) {
                        // Clear bean
                        this.clear();
@@ -187,6 +187,9 @@ public class JobsUserPasswordWebRequestBean extends BaseJobsBean implements Jobs
                        throw new FacesException(ex);
                }
 
+               // Fire event
+               this.userUpdatedPasswordEvent.fire(new UpdatedUserPasswordEvent(passwordHistory, this.getUserPassword()));
+
                // Clear bean
                this.clear();
 
index 114e0ec729f5e212b08486e365ca95366d68fcdc..c23cd2dd4e0fb5d3e53c7625d806bb288725d5de 100644 (file)
@@ -260,25 +260,28 @@ public class JobsUserRegisterWebRequestBean extends BaseJobsBean implements Jobs
                        user.setUserConfirmKey(confirmKey);
                }
 
+               // Init variable
+               final User registeredUser;
+
                try {
                        // Get base URL
                        final String baseUrl = FacesUtils.generateBaseUrl();
 
                        // Call bean
-                       final User registeredUser = this.registerBean.registerUser(user, baseUrl, randomPassword);
+                       registeredUser = this.registerBean.registerUser(user, baseUrl, randomPassword);
 
                        // The id number should be set
                        assert (registeredUser.getUserId() instanceof Long) : "registeredUser.userId is null after registerUser() was called."; //NOI18N
-
-                       // Fire event
-                       this.userRegisteredEvent.fire(new UserRegisteredEvent(registeredUser));
-
-                       // All fine, redirect to proper page
-                       return "user_register_done"; //NOI18N
                } catch (final UserNameAlreadyRegisteredException | EmailAddressAlreadyRegisteredException ex) {
                        // Continue to throw
                        throw new FacesException(ex);
                }
+
+               // Fire event
+               this.userRegisteredEvent.fire(new UserRegisteredEvent(registeredUser));
+
+               // All fine, redirect to proper page
+               return "user_register_done"; //NOI18N
        }
 
        /**
index d45ebdce0512d554b82714d5bb54180da46cd455..304d9b476d754f97fa87156ec80712bb35c058a5 100644 (file)
@@ -42,17 +42,8 @@ public class JobsBasicCompanyDataConverter implements Converter<BasicData> {
 
        @Override
        public BasicData getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
-               // Is the instance there?
-               if (null == BASIC_DATA_LIST_CONTROLLER) {
-                       // Get bean from CDI directly
-                       BASIC_DATA_LIST_CONTROLLER = CDI.current().select(JobsBasicDataListWebViewBean.class).get();
-               }
-
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
-                       // Warning message
-                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
-
                        // Return null
                        return null;
                }
@@ -60,6 +51,12 @@ public class JobsBasicCompanyDataConverter implements Converter<BasicData> {
                // Init instance
                BasicData basicData = null;
 
+               // Is the instance there?
+               if (null == BASIC_DATA_LIST_CONTROLLER) {
+                       // Get bean from CDI directly
+                       BASIC_DATA_LIST_CONTROLLER = CDI.current().select(JobssBasicDataListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long basicDataId = Long.valueOf(submittedValue);
index e135bf28754318bcfea3e6bbcbfda3588f7ab9d7..f05fe543de31c662d2661e6a36e5c413612568b3 100644 (file)
@@ -42,17 +42,8 @@ public class JobsBranchOfficeConverter implements Converter<BranchOffice> {
 
        @Override
        public BranchOffice getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
-               // Is the instance there?
-               if (null == BRANCH_OFFICE_LIST_CONTROLLER) {
-                       // Get bean from CDI directly
-                       BRANCH_OFFICE_LIST_CONTROLLER = CDI.current().select(JobsBranchOfficeListWebViewBean.class).get();
-               }
-
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
-                       // Warning message
-                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
-
                        // Return null
                        return null;
                }
@@ -60,6 +51,12 @@ public class JobsBranchOfficeConverter implements Converter<BranchOffice> {
                // Init instance
                BranchOffice branchOffice = null;
 
+               // Is the instance there?
+               if (null == BRANCH_OFFICE_LIST_CONTROLLER) {
+                       // Get bean from CDI directly
+                       BRANCH_OFFICE_LIST_CONTROLLER = CDI.current().select(JobssBranchOfficeListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long branchOfficeId = Long.valueOf(submittedValue);
index 19fdaa216ec73931f033849d4d5d756bfa76890b..4fb4f03d7d5001de327c9adaf5f79fa11b5b2d09 100644 (file)
@@ -51,16 +51,16 @@ public class JobsEmployeeConverter implements Converter<Employable> {
                // Init instance
                Employable companyEmployee = null;
 
+               // Is the instance there?
+               if (null == EMPLOYEE_LIST_CONTROLLER) {
+                       // Get bean from CDI directly
+                       EMPLOYEE_LIST_CONTROLLER = CDI.current().select(JobssEmployeeListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long employeeId = Long.valueOf(submittedValue);
 
-                       // Is the instance there?
-                       if (null == EMPLOYEE_LIST_CONTROLLER) {
-                               // Get bean from CDI directly
-                               EMPLOYEE_LIST_CONTROLLER = CDI.current().select(JobsEmployeeListWebViewBean.class).get();
-                       }
-
                        // Try to get user instance from it
                        companyEmployee = EMPLOYEE_LIST_CONTROLLER.findEmployeeById(employeeId);
                } catch (final NumberFormatException ex) {
index 3f2a1f47640b1c39cc73127ca89ad901127f4ca7..7b72dd5984e820f0667d26bc2d12dc2471a3d81b 100644 (file)
@@ -44,9 +44,6 @@ public class JobsDepartmentConverter implements Converter<Department> {
        public Department getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
-                       // Warning message
-                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
-
                        // Return null
                        return null;
                }
@@ -54,16 +51,16 @@ public class JobsDepartmentConverter implements Converter<Department> {
                // Init instance
                Department companyDepartment = null;
 
+               // Is the instance there?
+               if (null == DEPARTMENT_LIST_CONTROLLER) {
+                       // Get bean from CDI directly
+                       DEPARTMENT_LIST_CONTROLLER = CDI.current().select(JobssDepartmentListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long departmentId = Long.valueOf(submittedValue);
 
-                       // Is the instance there?
-                       if (null == DEPARTMENT_LIST_CONTROLLER) {
-                               // Get bean from CDI directly
-                               DEPARTMENT_LIST_CONTROLLER = CDI.current().select(JobsDepartmentListWebViewBean.class).get();
-                       }
-
                        // Try to get user instance from it
                        companyDepartment = DEPARTMENT_LIST_CONTROLLER.findDepartmentById(departmentId);
                } catch (final NumberFormatException ex) {
index 569b6471e52b8d59e7dba0fa9a1786a770bfc9d2..392ddd67af549cbb25c546a1ba0cef3ee4fe2a04 100644 (file)
@@ -42,19 +42,25 @@ public class JobsHeadquarterConverter implements Converter<Headquarter> {
 
        @Override
        public Headquarter getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
+               // Is the value null or empty?
+               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
+                       // Return null
+                       return null;
+               }
+
                // Init instance
                Headquarter headquarter = null;
 
+               // Is the instance there?
+               if (null == HEADQUARTER_LIST_CONTROLLER) {
+                       // Set it now
+                       HEADQUARTER_LIST_CONTROLLER = CDI.current().select(JobssHeadquarterListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long headquarterId = Long.valueOf(submittedValue);
 
-                       // Is the instance there?
-                       if (null == HEADQUARTER_LIST_CONTROLLER) {
-                               // Set it now
-                               HEADQUARTER_LIST_CONTROLLER = CDI.current().select(JobsHeadquarterListWebViewBean.class).get();
-                       }
-
                        // Try to get user instance from it
                        headquarter = HEADQUARTER_LIST_CONTROLLER.findHeadquarterById(headquarterId);
                } catch (final NumberFormatException ex) {
index 2d0a0c3266d41a1b21eaca358cbfabafb1f0b7b0..de8761ba653c78f789729c25f661cbc7a560d9c7 100644 (file)
@@ -44,9 +44,6 @@ public class JobsCompanyOpeningTimeConverter implements Converter<OpeningTime> {
        public OpeningTime getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
-                       // Warning message
-                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
-
                        // Return null
                        return null;
                }
@@ -54,16 +51,16 @@ public class JobsCompanyOpeningTimeConverter implements Converter<OpeningTime> {
                // Init instance
                OpeningTime openingTime = null;
 
+               // Is the instance there?
+               if (null == OPENING_TIME_LIST_CONTROLLER) {
+                       // Get bean from CDI directly
+                       OPENING_TIME_LIST_CONTROLLER = CDI.current().select(JobssOpeningTimeListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long openingTimeId = Long.valueOf(submittedValue);
 
-                       // Is the instance there?
-                       if (null == OPENING_TIMES_LIST_CONTROLLER) {
-                               // Get bean from CDI directly
-                               OPENING_TIMES_LIST_CONTROLLER = CDI.current().select(JobsOpeningTimeListWebViewBean.class).get();
-                       }
-
                        // Try to get user instance from it
                        openingTime = OPENING_TIMES_LIST_CONTROLLER.findOpeningTimeById(openingTimeId);
                } catch (final NumberFormatException ex) {
index 86741ceeac7ac07efea46e83589ca6896e747fae..1dc91db52a159ce363cc6caac37e9fd58686df2f 100644 (file)
@@ -42,17 +42,8 @@ public class JobsContactConverter implements Converter<Contact> {
 
        @Override
        public Contact getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
-               // Is the instance there?
-               if (null == CONTACT_LIST_CONTROLLER) {
-                       // Get bean from CDI directly
-                       CONTACT_LIST_CONTROLLER = CDI.current().select(JobsContactListWebViewBean.class).get();
-               }
-
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
-                       // Warning message
-                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
-
                        // Return null
                        return null;
                }
@@ -60,6 +51,12 @@ public class JobsContactConverter implements Converter<Contact> {
                // Init instance
                Contact contact = null;
 
+               // Is the instance there?
+               if (null == CONTACT_LIST_CONTROLLER) {
+                       // Get bean from CDI directly
+                       CONTACT_LIST_CONTROLLER = CDI.current().select(JobssContactListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long contactId = Long.valueOf(submittedValue);
index 6473599f9e9992897ae0dc3de1e1b935c8e2f076..283367fe0d24872e52284054feae52e24d1d6f38 100644 (file)
@@ -44,9 +44,6 @@ public class JobsCountryConverter implements Converter<Country> {
        public Country getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
-                       // Warning message
-                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
-
                        // Return null
                        return null;
                }
@@ -54,17 +51,17 @@ public class JobsCountryConverter implements Converter<Country> {
                // Init value
                Country country = null;
 
+               // Is the instance there?
+               if (null == COUNTRY_LIST_CONTROLLER) {
+                       // Get bean from CDI directly
+                       COUNTRY_LIST_CONTROLLER = CDI.current().select(JobssCountryListWebViewBean.class).get();
+               }
+
                // Try this better
                try {
                        // Convert it to long
                        final Long countryId = Long.parseLong(submittedValue);
 
-                       // Is the instance there?
-                       if (null == COUNTRY_LIST_CONTROLLER) {
-                               // Get bean from CDI directly
-                               COUNTRY_LIST_CONTROLLER = CDI.current().select(JobsCountryListWebViewBean.class).get();
-                       }
-
                        // Try to find it
                        country = COUNTRY_LIST_CONTROLLER.findCountryById(countryId);
                } catch (final NumberFormatException ex) {
index 51387181fdd862c54440dc55b954ee7b154bcbd7..c37cf3fd3223d4259b7cc0a256d513bc36c7369a 100644 (file)
@@ -51,16 +51,16 @@ public class JobsFaxNumberConverter implements Converter<DialableFaxNumber> {
                // Init instance
                DialableFaxNumber faxNumber = null;
 
+               // Is the instance there?
+               if (null == PHONE_LIST_CONTROLLER) {
+                       // Get bean from CDI directly
+                       PHONE_LIST_CONTROLLER = CDI.current().select(JobssPhoneListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long faxNumberId = Long.valueOf(submittedValue);
 
-                       // Is the instance there?
-                       if (null == PHONE_LIST_CONTROLLER) {
-                               // Get bean from CDI directly
-                               PHONE_LIST_CONTROLLER = CDI.current().select(JobsPhoneListWebViewBean.class).get();
-                       }
-
                        // Try to get mobile instance from it
                        faxNumber = PHONE_LIST_CONTROLLER.findFaxNumberById(faxNumberId);
                } catch (final NumberFormatException ex) {
index 5c808704e181386091bd082f5d18b8ee9c4ee2ca..8c5a57770aae57d85782831a1b38eb6b62093f2f 100644 (file)
@@ -51,16 +51,16 @@ public class JobsLandLineNumberConverter implements Converter<DialableLandLineNu
                // Init instance
                DialableLandLineNumber landLineNumber = null;
 
+               // Is the instance there?
+               if (null == PHONE_LIST_CONTROLLER) {
+                       // Get bean from CDI directly
+                       PHONE_LIST_CONTROLLER = CDI.current().select(JobssPhoneListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long landLineNumberId = Long.valueOf(submittedValue);
 
-                       // Is the instance there?
-                       if (null == PHONE_LIST_CONTROLLER) {
-                               // Get bean from CDI directly
-                               PHONE_LIST_CONTROLLER = CDI.current().select(JobsPhoneListWebViewBean.class).get();
-                       }
-
                        // Try to get mobile instance from it
                        landLineNumber = PHONE_LIST_CONTROLLER.findLandLineNumberById(landLineNumberId);
                } catch (final NumberFormatException ex) {
index 60b3ee627c1ce65b58cf37ad571e8e46810feabe..b31921fffb10d4da2bc782a57ab16c0608a1c56c 100644 (file)
@@ -51,16 +51,16 @@ public class JobsMobileNumberConverter implements Converter<DialableMobileNumber
                // Init instance
                DialableMobileNumber mobileNumber = null;
 
+               // Is the instance there?
+               if (null == MOBILE_LIST_CONTROLLER) {
+                       // Get bean from CDI directly
+                       MOBILE_LIST_CONTROLLER = CDI.current().select(JobssMobileListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long mobileNumberId = Long.valueOf(submittedValue);
 
-                       // Is the instance there?
-                       if (null == MOBILE_LIST_CONTROLLER) {
-                               // Get bean from CDI directly
-                               MOBILE_LIST_CONTROLLER = CDI.current().select(JobsMobileListWebViewBean.class).get();
-                       }
-
                        // Try to get mobile instance from it
                        mobileNumber = MOBILE_LIST_CONTROLLER.findMobileNumberById(mobileNumberId);
                } catch (final NumberFormatException ex) {
index b26acae5056cfd546478ba3d095edf210b35c11d..9cb07ae99140f6f792fa6e6018dc5487b418e127 100644 (file)
@@ -51,17 +51,17 @@ public class JobsMobileProviderConverter implements Converter<MobileProvider> {
                // Init value
                MobileProvider mobileProvider = null;
 
+               // Is the instance there?
+               if (null == MOBILE_PROVIDER_LIST_CONTROLLER) {
+                       // Get bean from CDI directly
+                       MOBILE_PROVIDER_LIST_CONTROLLER = CDI.current().select(JobssMobileProviderListWebViewBean.class).get();
+               }
+
                // Try this better
                try {
                        // Convert it to long
                        final Long providerId = Long.parseLong(submittedValue);
 
-                       // Is the instance there?
-                       if (null == MOBILE_PROVIDER_LIST_CONTROLLER) {
-                               // Get bean from CDI directly
-                               MOBILE_PROVIDER_LIST_CONTROLLER = CDI.current().select(JobsMobileProviderListWebViewBean.class).get();
-                       }
-
                        // Lookup of mobile provider
                        mobileProvider = MOBILE_PROVIDER_LIST_CONTROLLER.findMobileProviderById(providerId);
                } catch (final NumberFormatException ex) {
index 241e1c284c2f2e28be5545f3e94c88d88cb2b754..c158980187f581dd6fc0b9e362dd1cec6bd0d671 100644 (file)
@@ -42,12 +42,6 @@ public class JobsUserConverter implements Converter<User> {
 
        @Override
        public User getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
-               // Is the instance there?
-               if (null == USER_LIST_CONTROLLER) {
-                       // Get bean from CDI directly
-                       USER_LIST_CONTROLLER = CDI.current().select(JobsUserListWebViewBean.class).get();
-               }
-
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
                        // Warning message
@@ -60,6 +54,12 @@ public class JobsUserConverter implements Converter<User> {
                // Init instance
                User user = null;
 
+               // Is the instance there?
+               if (null == USER_LIST_CONTROLLER) {
+                       // Get bean from CDI directly
+                       USER_LIST_CONTROLLER = CDI.current().select(JobssUserListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long userId = Long.valueOf(submittedValue);
index a42bed7ab81ec4feb2b1abb612fd223979e645cf..70932c5a64b60533996e802f244f1ff973e20b8a 100644 (file)
@@ -827,7 +827,6 @@ ENTERED_EMAIL_ADDRESS_IS_INVALID=Die eingegebene Email-Addresse entspricht nicht
 ADMIN_BASIC_DATA_LEGEND=Basisdaten f\u00fcr gesch\u00e4ftlichen Kontakt:
 ADMIN_BASIC_DATA_LEGEND_TITLE=Geben Sie die Basisdaten f\u00fcr einen gesch\u00e4ftlichen Kontakt ein.
 ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_REQUIRED=Bitte geben Sie den kurzen Firmennamen ein.
-ADMIN_BASIC_DATA_COMPANY_LEGAL_STATUS=Rechtsform (z.B. GmbH):
 ADMIN_BASIC_DATA_COMPANY_EMAIL_ADDRESS=Haupt-Email-Adresse:
 BUTTON_ADMIN_ADD_BASIC_DATA=Basisdaten hinzuf\u00fcgen
 ERROR_GUEST_REGISTRATION_IN_INDEX_ENABLED=Fehler: Falscher Aufruf der Anmeldeseite, da die Eingangsseite als Anmeldeseite fungiert.
@@ -1229,3 +1228,6 @@ ADMIN_CONTACT_DETAILS_HEADER=Kontaktdaten zu {0} {1} {2}:
 ADMIN_DEPARTMENT_DETAILS_HEADER=Daten der Abteilung {0} (Id {1}):
 ADMIN_HEADQUARTER_DETAILS_HEADER=Haupstelle von {0} (Id {1})):
 ERROR_PARAMETER_CONFIRM_KEY_IS_NOT_SET=Fehler: Parameter "confirmationKey" ist nicht gesetzt.
+ROAD_NUMBER_HEADER=Betriebsnummer:
+ADMIN_BASIC_DATA_COMPANY_ROAD_NUMBER=Betriebsnummer:
+BASIC_DATA_COMPANY_ROAD_NUMBER_MISMATCHES_PATTERN=Die Betriebsnummer stimmt nicht mit dem regul\u00e4ren Ausruck AA BB 12345 \u00fcberein.
index 9b9ed14886c8e571e62a24a5fe0ae533a578d905..8a828f4cfd9d105cf76cbcdf1e7429ac154dee66 100644 (file)
@@ -807,7 +807,6 @@ ENTERED_EMAIL_ADDRESS_IS_INVALID=Your entered email address is not valid.
 ADMIN_BASIC_DATA_LEGEND=Basic data for business contact:
 ADMIN_BASIC_DATA_LEGEND_TITLE=Enter basic data for a business contact.
 ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_REQUIRED=Please enter the company's short name.
-ADMIN_BASIC_DATA_COMPANY_LEGAL_STATUS=Legal status (e.g. Inc.):
 ADMIN_BASIC_DATA_COMPANY_EMAIL_ADDRESS=Main email address:
 BUTTON_ADMIN_ADD_BASIC_DATA=Add basic data
 ERROR_GUEST_REGISTRATION_IN_INDEX_ENABLED=Error: Wrong request on registration page as the index page serves as registration page.
@@ -1124,7 +1123,7 @@ TAX_NUMBER_HEADER=Tax number:
 EMPLOYEE_NUMBER_HEADER=Employee number:
 BACK=Back
 OPTIONS=Options
-ADMIN_BASIC_DATA_COMPANY_SHORT_NAME=Company's short name
+ADMIN_BASIC_DATA_COMPANY_SHORT_NAME=Company's short name:
 ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_HEADER=Short name:
 AVAILABLE_HEADER=Available:
 ADMIN_MANUFACTURER_HEADER=Manufacturer:
@@ -1135,3 +1134,6 @@ ADMIN_DEPARTMENT_DETAILS_HEADER=Data of department {0} (Id {1}):
 ADMIN_HEADQUARTER_DETAILS_HEADER=Headquarter of {0} (Id {1})):
 CHANGE=Change?
 ERROR_PARAMETER_CONFIRM_KEY_IS_NOT_SET=Error: Parameter "confirmKey" is required.
+ROAD_NUMBER_HEADER=Road number:
+ADMIN_BASIC_DATA_COMPANY_ROAD_NUMBER=Road number:
+BASIC_DATA_COMPANY_ROAD_NUMBER_MISMATCHES_PATTERN=Company's road number does not match pattern AA BB 12345.
index e39371c36a85f92a888eb80a9e98dc0657945eb3..00b6545d79c964ce40c2723a5f7d43a057bb52ae 100644 (file)
@@ -36,7 +36,7 @@
                                        value="#{basicDataListController.allBasicData}"
                                        var="basicData"
                                        itemValue="#{basicData}"
-                                       itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+                                       itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
                                        />
                        </p:selectOneMenu>
 
@@ -56,7 +56,7 @@
                                        value="#{employeeListController.allEmployees}"
                                        var="companyEmployee"
                                        itemValue="#{companyEmployee}"
-                                       itemLabel="#{beanHelper.renderEmployee(companyEmployee)}"
+                                       itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
                                        />
                        </p:selectOneMenu>
 
@@ -76,7 +76,7 @@
                                        value="#{employeeListController.allEmployees}"
                                        var="companyEmployee"
                                        itemValue="#{companyEmployee}"
-                                       itemLabel="#{beanHelper.renderEmployee(companyEmployee)}"
+                                       itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
                                        />
                        </p:selectOneMenu>
 
index 2233585d7a23f561fd59d6526765097bc24724c8..2a8e99badf3a16e35542002b681aefe90e02e2d9 100644 (file)
@@ -43,7 +43,7 @@
                                        value="#{basicDataListController.allBasicData}"
                                        var="basicData"
                                        itemValue="#{basicData}"
-                                       itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+                                       itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
                                        />
                        </p:selectOneMenu>
 
@@ -62,7 +62,7 @@
                                        value="#{branchOfficeListController.allBranchOffices}"
                                        var="branchOffice"
                                        itemValue="#{branchOffice}"
-                                       itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
+                                       itemLabel="#{beanHelper.renderBranchOffice(branchOffice, false)}"
                                        />
                        </p:selectOneMenu>
 
                                        value="#{employeeListController.allEmployees}"
                                        var="employee"
                                        itemValue="#{employee}"
-                                       itemLabel="#{beanHelper.renderEmployee(employee)}"
+                                       itemLabel="#{beanHelper.renderEmployee(employee, false)}"
                                        />
                        </p:selectOneMenu>
 
index b2afd25f2558327e7931e6a4cb3bbb3a92f00e79..7e2dd3f7ae820020b2afd40df91166ade727afe5 100644 (file)
@@ -41,7 +41,7 @@
                                        value="#{basicDataListController.allBasicData}"
                                        var="basicData"
                                        itemValue="#{basicData}"
-                                       itemLabel="#{beanHelper.renderBasicData(basicData)}"
+                                       itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
                                        />
                        </p:selectOneMenu>
 
@@ -61,7 +61,7 @@
                                        value="#{branchOfficeListController.allBranchOffices}"
                                        var="branchOffice"
                                        itemValue="#{branchOffice}"
-                                       itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
+                                       itemLabel="#{beanHelper.renderBranchOffice(branchOffice, false)}"
                                        />
                        </p:selectOneMenu>
 
                                        value="#{departmentListController.allDepartments}"
                                        var="department"
                                        itemValue="#{department}"
-                                       itemLabel="#{beanHelper.renderDepartment(department)}"
+                                       itemLabel="#{beanHelper.renderDepartment(department, false)}"
                                        />
                        </p:selectOneMenu>
 
index 396c483ba301aa724a869d78afb6982ffbca21a9..e35824b36d63884b550eb857c60cd3be0bea3af7 100644 (file)
@@ -47,7 +47,7 @@
                                        value="#{employeeListController.allEmployees}"
                                        var="companyEmployee"
                                        itemValue="#{companyEmployee}"
-                                       itemLabel="#{beanHelper.renderEmployee(companyEmployee)}"
+                                       itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
                                        />
                        </p:selectOneMenu>
 
index 26c732d47eb11e912d435a9593f032cd4c58faad..606fc527c9118846f309f3a14210f2d1a381e96b 100644 (file)
@@ -6,6 +6,8 @@
        xmlns:h="http://xmlns.jcp.org/jsf/html"
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        xmlns:p="http://primefaces.org/ui"
+       xmlns:core="http://mxchange.org/jsf/core/widgets"
+       xmlns:validator="http://mxchange.org/jsf/core/validators"
        >
 
        <ui:define name="document_admin_title">
                                                                value="#{employeeListController.allEmployees}"
                                                                var="employee"
                                                                itemValue="#{employee}"
-                                                               itemLabel="#{beanHelper.renderEmployee(employee)}"
+                                                               itemLabel="#{beanHelper.renderEmployee(employee, true)}"
                                                                />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                        <p:link
                                                outcome="admin_show_employee"
-                                               value="#{beanHelper.renderEmployee(basicData.companyContactEmployee)}"
+                                               value="#{beanHelper.renderEmployee(basicData.companyContactEmployee, true)}"
                                                title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_CONTACT_PERSON_TITLE}"
                                                rendered="#{not empty basicData.companyContactEmployee}"
                                                >
                                                                value="#{employeeListController.allEmployees}"
                                                                var="employee"
                                                                itemValue="#{employee}"
-                                                               itemLabel="#{beanHelper.renderEmployee(employee)}"
+                                                               itemLabel="#{beanHelper.renderEmployee(employee, false)}"
                                                                />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                        <p:link
                                                outcome="admin_show_employee"
-                                               value="#{beanHelper.renderEmployee(basicData.companyFounder)}"
+                                               value="#{beanHelper.renderEmployee(basicData.companyFounder, false)}"
                                                title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_COMPANY_FOUNDER_TITLE}"
                                                rendered="#{not empty basicData.companyFounder}"
                                                >
                                        <h:outputText value="#{msg.ADMIN_ADD_BASIC_DATA_MINIMUM_DATA}" />
                                </h:panelGroup>
 
-                               <ui:include src="/WEB-INF/templates/admin/basic_data/admin_form_basic_data.tpl" />
+                               <h:panelGroup styleClass="para" layout="block">
+                                       <p:fieldset legend="#{msg.ADMIN_BASIC_DATA_LEGEND}">
+                                               <p:panelGrid
+                                                       columns="2"
+                                                       columnClasses="ui-grid-col-4,ui-grid-col-8"
+                                                       styleClass="ui-noborder"
+                                                       >
+                                                       <p:outputLabel for="companyShortName" value="#{msg.ADMIN_BASIC_DATA_COMPANY_SHORT_NAME}" />
+                                                       <p:inputText
+                                                               id="companyShortName"
+                                                               value="#{adminBasicCompanyDataController.companyShortName}"
+                                                               size="20"
+                                                               maxlength="100"
+                                                               required="true"
+                                                               requiredMessage="#{msg.ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_REQUIRED}"
+                                                               >
+                                                               <f:validator validatorId="BasicDataCompanyShortNameValidator" />
+                                                               <f:attribute name="checkExisting" value="false" />
+                                                       </p:inputText>
+
+                                                       <p:outputLabel for="companyName" value="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME}" />
+                                                       <p:inputText
+                                                               id="companyName"
+                                                               value="#{adminBasicCompanyDataController.companyName}"
+                                                               size="30"
+                                                               maxlength="255"
+                                                               >
+                                                               <f:validator validatorId="BasicDataCompanyNameValidator" />
+                                                               <f:attribute name="checkExisting" value="false" />
+                                                       </p:inputText>
+
+                                                       <p:outputLabel for="companyEmailAddress" value="#{msg.ADMIN_BASIC_DATA_COMPANY_EMAIL_ADDRESS}" />
+                                                       <p:inputText
+                                                               id="companyEmailAddress"
+                                                               size="40"
+                                                               maxlength="255"
+                                                               value="#{adminBasicCompanyDataController.companyEmailAddress}"
+                                                               validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}"
+                                                               >
+                                                               <validator:basicDataEmailAddressValidator allowEmptyRequiredData="true" />
+                                                       </p:inputText>
+
+                                                       <p:outputLabel for="companyLogo" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_LOGO}" />
+                                                       <core:outputMessageBox
+                                                               panelGroupId="companyLogo"
+                                                               message="#{msg.ADMIN_FEATURE_UNFINISHED_WARNING}"
+                                                               boxStyleClass="message-full"
+                                                               messageStyleClass="alert-warning"
+                                                               />
+
+                                                       <p:outputLabel for="companyRoadNumber" value="#{msg.ADMIN_BASIC_DATA_COMPANY_ROAD_NUMBER}" />
+                                                       <p:inputText
+                                                               id="companyRoadNumber"
+                                                               size="10"
+                                                               maxlength="10"
+                                                               value="#{adminBasicCompanyDataController.companyRoadNumber}"
+                                                               onblur="value = value.toUpperCase()"
+                                                               >
+                                                               <f:validateRegex
+                                                                       pattern="[A-Z]{2} [A-Z]{2} [0-9]{2,5}"
+                                                                       />
+                                                               <f:validator validatorId="BasicDataCompanyRoadNumberValidator" />
+                                                               <f:attribute name="checkExisting" value="false" />
+                                                       </p:inputText>
+
+                                                       <p:outputLabel for="companyTaxNumber" value="#{msg.ADMIN_BASIC_DATA_COMPANY_TAX_NUMBER}" />
+                                                       <p:inputText
+                                                               id="companyTaxNumber"
+                                                               size="30"
+                                                               maxlength="200"
+                                                               value="#{adminBasicCompanyDataController.companyTaxNumber}"
+                                                               />
+
+                                                       <p:outputLabel for="companyWebsiteUrl" value="#{msg.ADMIN_BASIC_DATA_COMPANY_WEBSITE_URL}" />
+                                                       <p:inputText
+                                                               id="companyWebsiteUrl"
+                                                               size="30"
+                                                               maxlength="200"
+                                                               value="#{adminBasicCompanyDataController.companyWebsiteUrl}"
+                                                               validatorMessage="#{msg.URL_NOT_MATCHING_REGULAR_EXPRESSION}"
+                                                               >
+                                                               <validator:urlValidator allowEmptyRequiredData="true" />
+                                                       </p:inputText>
+
+                                                       <p:outputLabel for="companyUserOwner" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_USER_OWNER}" />
+                                                       <p:selectOneMenu
+                                                               id="companyUserOwner"
+                                                               value="#{adminBasicCompanyDataController.companyUserOwner}"
+                                                               filter="true"
+                                                               filterMatchMode="contains"
+                                                               >
+
+                                                               <f:converter converterId="UserConverter" />
+
+                                                               <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+
+                                                               <f:selectItems
+                                                                       value="#{userListController.allUsers}"
+                                                                       var="companyUserOwner"
+                                                                       itemValue="#{companyUserOwner}"
+                                                                       itemLabel="#{beanHelper.renderContact(companyUserOwner.userContact)} (#{companyUserOwner.userName})"
+                                                                       />
+                                                       </p:selectOneMenu>
+
+                                                       <p:outputLabel for="companyContactEmployee" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_CONTACT_EMPLOYEE}" />
+                                                       <p:selectOneMenu
+                                                               id="companyContactEmployee"
+                                                               value="#{adminBasicCompanyDataController.companyContactEmployee}"
+                                                               filter="true"
+                                                               filterMatchMode="contains"
+                                                               >
+
+                                                               <f:converter converterId="EmployeeConverter" />
+
+                                                               <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+
+                                                               <f:selectItems
+                                                                       value="#{employeeListController.allEmployees}"
+                                                                       var="companyEmployee"
+                                                                       itemValue="#{companyEmployee}"
+                                                                       itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
+                                                                       />
+                                                       </p:selectOneMenu>
+
+                                                       <p:outputLabel for="companyFounder" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_FOUNDER}" />
+                                                       <p:selectOneMenu
+                                                               id="companyFounder"
+                                                               value="#{adminBasicCompanyDataController.companyFounder}"
+                                                               filter="true"
+                                                               filterMatchMode="contains"
+                                                               >
+
+                                                               <f:converter converterId="EmployeeConverter" />
+
+                                                               <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+
+                                                               <f:selectItems
+                                                                       value="#{employeeListController.allEmployees}"
+                                                                       var="companyEmployee"
+                                                                       itemValue="#{companyEmployee}"
+                                                                       itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
+                                                                       />
+                                                       </p:selectOneMenu>
+
+                                                       <p:outputLabel for="companyHeadquarter" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_HEADQUARTER}" />
+                                                       <p:selectOneMenu
+                                                               id="companyHeadquarter"
+                                                               value="#{adminBasicCompanyDataController.companyHeadQuarter}"
+                                                               filter="true"
+                                                               filterMatchMode="contains"
+                                                               >
+
+                                                               <f:converter converterId="HeadquarterConverter" />
+
+                                                               <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+
+                                                               <f:selectItems
+                                                                       value="#{headquarterListController.allHeadquarters}"
+                                                                       var="headquarter"
+                                                                       itemValue="#{headquarter}"
+                                                                       itemLabel="#{beanHelper.renderHeadquarter(headquarter)}"
+                                                                       />
+                                                       </p:selectOneMenu>
+
+                                                       <p:outputLabel for="landLineCountry" value="#{msg.ADMIN_BASIC_DATA_PHONE_NUMBER}" />
+                                                       <core:inputLandLineNumberPanelGrid targetController="#{adminBasicCompanyDataController}" />
+
+                                                       <p:outputLabel for="faxCountry" value="#{msg.ADMIN_BASIC_DATA_FAX_NUMBER}" />
+                                                       <core:inputFaxNumberPanelGrid targetController="#{adminBasicCompanyDataController}" />
+
+                                                       <p:outputLabel for="companyComments" value="#{msg.ADMIN_BASIC_DATA_COMPANY_COMMENTS}" />
+                                                       <p:inputTextarea
+                                                               id="companyComments"
+                                                               value="#{adminBasicCompanyDataController.companyComments}"
+                                                               rows="7"
+                                                               cols="25"
+                                                               />
+                                               </p:panelGrid>
+                                       </p:fieldset>
+                               </h:panelGroup>
 
                                <f:facet name="footer">
                                        <p:panelGrid columns="2" layout="grid">
index 919baa810f7d8434b95edda5d008e5430514d5eb..0a55aa17e6b06a2037dab4c34b53c844726159c7 100644 (file)
                                                                value="#{basicDataListController.allBasicData}"
                                                                var="basicData"
                                                                itemValue="#{basicData}"
-                                                               itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+                                                               itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
                                                                />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                        <p:link
                                                outcome="admin_show_basic_data"
-                                               value="#{beanHelper.renderBasicData(branchOffice.branchCompany, true)}"
+                                               value="#{beanHelper.renderBasicData(branchOffice.branchCompany, true, false)}"
                                                title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
                                                >
                                                <f:param name="basicDataId" value="#{branchOffice.branchCompany.basicDataId}" />
                                        filterBy="#{branchOffice.branchCity}"
                                        filterMatchMode="contains"
                                        >
-                                       <h:outputText value="#{beanHelper.renderBranchOffice(branchOffice)}" title="#{beanHelper.renderBranchOffice(branchOffice)}" />
+                                       <h:outputText
+                                               value="#{beanHelper.renderBranchOffice(branchOffice, false)}"
+                                               title="#{beanHelper.renderBranchOffice(branchOffice, true)}"
+                                               />
                                </p:column>
 
                                <p:column
                                                                value="#{employeeListController.allEmployees}"
                                                                var="employee"
                                                                itemValue="#{employee}"
-                                                               itemLabel="#{beanHelper.renderEmployee(employee)}"
+                                                               itemLabel="#{beanHelper.renderEmployee(employee, false)}"
                                                                />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                        <p:link
                                                outcome="admin_show_employee"
-                                               value="#{beanHelper.renderEmployee(branchOffice.branchContactEmployee)}"
+                                               value="#{beanHelper.renderEmployee(branchOffice.branchContactEmployee, false)}"
                                                title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}"
                                                rendered="#{not empty branchOffice.branchContactEmployee}"
                                                >
                                                                <p:link
                                                                        outcome="admin_show_basic_data"
                                                                        target="_blank"
-                                                                       value="#{beanHelper.renderBasicData(branchOfficeListController.selectedBranchOffice.branchCompany, false)}"
+                                                                       value="#{beanHelper.renderBasicData(branchOfficeListController.selectedBranchOffice.branchCompany, false, true)}"
                                                                        title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
                                                                        >
                                                                        <f:param name="basicDataId" value="#{branchOfficeListController.selectedBranchOffice.branchCompany.basicDataId}" />
                                                                <p:link
                                                                        outcome="admin_show_employee"
                                                                        target="_blank"
-                                                                       value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchContactEmployee)}"
+                                                                       value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchContactEmployee, true)}"
                                                                        title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}"
                                                                        rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}"
                                                                        >
                                                                <p:link
                                                                        outcome="admin_show_employee"
                                                                        target="_blank"
-                                                                       value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchOwnerEmployee)}"
+                                                                       value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchOwnerEmployee, true)}"
                                                                        title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_EMPLOYEE_TITLE}"
                                                                        rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}"
                                                                        >
index 5737d7199fa60b34a3da2978f1339df26dd92238..f0e7e70292c4171c7fae6c43999d0f52dbbccc7e 100644 (file)
                                                                value="#{basicDataListController.allBasicData}"
                                                                var="basicData"
                                                                itemValue="#{basicData}"
-                                                               itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+                                                               itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
                                                                />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                        <p:link
                                                outcome="admin_show_basic_data"
-                                               value="#{beanHelper.renderBasicData(department.departmentCompany, true)}"
+                                               value="#{beanHelper.renderBasicData(department.departmentCompany, true, false)}"
                                                title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
                                                >
                                                <f:param name="basicDataId" value="#{department.departmentCompany.basicDataId}" />
                                                                value="#{branchOfficeListController.allBranchOffices}"
                                                                var="branchOffice"
                                                                itemValue="#{branchOffice}"
-                                                               itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
+                                                               itemLabel="#{beanHelper.renderBranchOffice(branchOffice, false)}"
                                                                />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                        <p:link
                                                outcome="admin_show_branch_office"
-                                               value="#{beanHelper.renderBranchOffice(department.departmentBranchOffice)}"
+                                               value="#{beanHelper.renderBranchOffice(department.departmentBranchOffice, false)}"
                                                title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
                                                rendered="#{not empty department.departmentBranchOffice}"
                                                >
                                                                value="#{employeeListController.allEmployees}"
                                                                var="employee"
                                                                itemValue="#{employee}"
-                                                               itemLabel="#{beanHelper.renderEmployee(employee)}"
+                                                               itemLabel="#{beanHelper.renderEmployee(employee, false, false)}"
                                                                />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                        <p:link
                                                outcome="admin_show_employee"
-                                               value="#{beanHelper.renderEmployee(department.departmentLead)}"
+                                               value="#{beanHelper.renderEmployee(department.departmentLead, true)}"
                                                title="#{msg.ADMIN_LINK_SHOW_DEPARTMENT_LEAD_EMPLOYEE_TITLE}"
                                                rendered="#{not empty department.departmentLead}"
                                                >
index 399f38fd26130e850b15d0df42ffe575a358dda7..94b2457365f765512532fe6307b22c01519155c7 100644 (file)
                                                                value="#{branchOfficeListController.allBranchOffices}"
                                                                var="branchOffice"
                                                                itemValue="#{branchOffice}"
-                                                               itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
+                                                               itemLabel="#{beanHelper.renderBranchOffice(branchOffice, false)}"
                                                                />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                        <p:link
                                                outcome="admin_show_branch_office"
-                                               value="#{beanHelper.renderBranchOffice(employee.employeeBranchOffice)}"
+                                               value="#{beanHelper.renderBranchOffice(employee.employeeBranchOffice, false)}"
                                                title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
                                                rendered="#{not empty employee.employeeBranchOffice}"
                                                >
                                                                value="#{basicDataListController.allBasicData}"
                                                                var="basicData"
                                                                itemValue="#{basicData}"
-                                                               itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+                                                               itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
                                                                />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                        <p:link
                                                outcome="admin_show_basic_data"
-                                               value="#{beanHelper.renderBasicData(employee.employeeBasicData, true)}"
+                                               value="#{beanHelper.renderBasicData(employee.employeeBasicData, true, false)}"
                                                title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
                                                >
                                                <f:param name="basicDataId" value="#{employee.employeeBasicData.basicDataId}" />
index c0268868076c634e8d5ee0f155c1e9ccec77e775..297a5c74503426530cc262b9327b32173e2fdca5 100644 (file)
                                                                value="#{employeeListController.allEmployees}"
                                                                var="employee"
                                                                itemValue="#{employee}"
-                                                               itemLabel="#{beanHelper.renderEmployee(employee)}"
+                                                               itemLabel="#{beanHelper.renderEmployee(employee, false)}"
                                                                />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                        <p:link
                                                outcome="admin_show_employee"
-                                               value="#{beanHelper.renderEmployee(headquarter.headquarterContactEmployee)}"
+                                               value="#{beanHelper.renderEmployee(headquarter.headquarterContactEmployee, false)}"
                                                title="#{msg.ADMIN_LINK_SHOW_HEADQUARTER_CONTACT_PERSON_TITLE}"
                                                rendered="#{not empty headquarter.headquarterContactEmployee}"
                                                >