]> git.mxchange.org Git - jfinancials-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>
Thu, 23 Apr 2020 00:29:42 +0000 (02:29 +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>
32 files changed:
src/java/org/mxchange/jfinancials/beans/business/basicdata/FinancialsAdminBasicDataWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/business/basicdata/list/FinancialsBasicDataListWebViewBean.java
src/java/org/mxchange/jfinancials/beans/business/basicdata/list/FinancialsBasicDataListWebViewController.java
src/java/org/mxchange/jfinancials/beans/helper/FinancialsWebViewHelperBean.java
src/java/org/mxchange/jfinancials/beans/user/FinancialsAdminUserWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/user/password/FinancialsUserPasswordWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/user/register/FinancialsUserRegisterWebRequestBean.java
src/java/org/mxchange/jfinancials/converter/business/basicdata/FinancialsBasicCompanyDataConverter.java
src/java/org/mxchange/jfinancials/converter/business/branchoffice/FinancialsBranchOfficeConverter.java
src/java/org/mxchange/jfinancials/converter/business/department/FinancialsDepartmentConverter.java
src/java/org/mxchange/jfinancials/converter/business/employee/FinancialsEmployeeConverter.java
src/java/org/mxchange/jfinancials/converter/business/headquarter/FinancialsHeadquarterConverter.java
src/java/org/mxchange/jfinancials/converter/business/opening_time/FinancialsCompanyOpeningTimeConverter.java
src/java/org/mxchange/jfinancials/converter/contact/FinancialsContactConverter.java
src/java/org/mxchange/jfinancials/converter/country/FinancialsCountryConverter.java
src/java/org/mxchange/jfinancials/converter/fax/FinancialsFaxNumberConverter.java
src/java/org/mxchange/jfinancials/converter/landline/FinancialsLandLineNumberConverter.java
src/java/org/mxchange/jfinancials/converter/mobile/FinancialsMobileNumberConverter.java
src/java/org/mxchange/jfinancials/converter/mobileprovider/FinancialsMobileProviderConverter.java
src/java/org/mxchange/jfinancials/converter/user/FinancialsUserConverter.java
src/java/org/mxchange/localization/generic_de_DE.properties
src/java/org/mxchange/localization/generic_en_US.properties
web/WEB-INF/templates/admin/basic_data/admin_form_basic_data.tpl [deleted file]
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 68d513b2c0227b68872781b470a2ba707de9df15..dbfb419c7916e16c6c5d54fe644ee5c5a6acbc28 100644 (file)
@@ -96,6 +96,11 @@ public class FinancialsAdminBasicDataWebRequestBean extends BaseFinancialsBean i
         */
        private String companyName;
 
+       /**
+        * Company's road number
+        */
+       private String companyRoadNumber;
+
        /**
         * Company short name
         */
@@ -181,15 +186,28 @@ public class FinancialsAdminBasicDataWebRequestBean extends BaseFinancialsBean i
                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 FinancialsAdminBasicDataWebRequestBean extends BaseFinancialsBean i
                        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 FinancialsAdminBasicDataWebRequestBean extends BaseFinancialsBean i
                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 272f47fbcab9473f1d8f69f1dc05046a3fd65e6a..8f19ec63355b800619ad5f25129b4cff725aee65 100644 (file)
@@ -253,6 +253,34 @@ public class FinancialsBasicDataListWebViewBean extends BaseFinancialsBean imple
                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 063f590ea420e89d851df8ca45f0b649f5fa7695..c4a04e6024d926e12c59573eaaf79eaa85500925 100644 (file)
@@ -27,6 +27,15 @@ import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
  */
 public interface FinancialsBasicDataListWebViewController 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 6b6aa2b23d0887eb0e61aa6b547018cc622d7bf2..4e951dc6b8a553cd7e48bfe60d6c4372fc3bec14 100644 (file)
@@ -443,12 +443,13 @@ public class FinancialsWebViewHelperBean extends BaseFinancialsBean implements F
        /**
         * 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 FinancialsWebViewHelperBean extends BaseFinancialsBean implements F
                        }
 
                        // 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 FinancialsWebViewHelperBean extends BaseFinancialsBean implements F
         * 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 FinancialsWebViewHelperBean extends BaseFinancialsBean implements F
                        }
 
                        // 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 FinancialsWebViewHelperBean extends BaseFinancialsBean implements F
         * 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 FinancialsWebViewHelperBean extends BaseFinancialsBean implements F
                        // 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 FinancialsWebViewHelperBean extends BaseFinancialsBean implements F
         * 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 FinancialsWebViewHelperBean extends BaseFinancialsBean implements F
                                }
 
                                // 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 0f927872fec07e77c70956b94660caf352a7c967..548eea32357cd47818372b9b0c83f60842650257 100644 (file)
@@ -27,7 +27,6 @@ import javax.enterprise.inject.Any;
 import javax.faces.FacesException;
 import javax.faces.application.FacesMessage;
 import javax.faces.context.FacesContext;
-import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontacts.model.contact.Contact;
@@ -49,6 +48,7 @@ import org.mxchange.jusercore.events.user.locked.ObservableAdminLockedUserEvent;
 import org.mxchange.jusercore.events.user.unlocked.AdminUnlockedUserEvent;
 import org.mxchange.jusercore.events.user.unlocked.ObservableAdminUnlockedUserEvent;
 import org.mxchange.jusercore.events.user.update.post.AdminPostUserDataUpdatedEvent;
+import org.mxchange.jusercore.events.user.update.post.ObservableAdminPostUserDataUpdatedEvent;
 import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException;
 import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
@@ -65,7 +65,6 @@ import org.mxchange.juserlogincore.container.login.UserLoginContainer;
 import org.mxchange.juserlogincore.events.registration.ObservableUserRegisteredEvent;
 import org.mxchange.juserlogincore.exceptions.UserPasswordRepeatMismatchException;
 import org.mxchange.juserlogincore.login.UserLoginUtils;
-import org.mxchange.jusercore.events.user.update.post.ObservableAdminPostUserDataUpdatedEvent;
 
 /**
  * A user bean (controller)
@@ -252,26 +251,31 @@ public class FinancialsAdminUserWebRequestBean extends BaseFinancialsBean implem
                        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 7274a604d312e3bff4eb5129340bbab9b5d95e96..97e571b8f39526dfb93336219121558c28956bcc 100644 (file)
@@ -170,15 +170,15 @@ public class FinancialsUserPasswordWebRequestBean extends BaseFinancialsBean imp
                // 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 FinancialsUserPasswordWebRequestBean extends BaseFinancialsBean imp
                        throw new FacesException(ex);
                }
 
+               // Fire event
+               this.userUpdatedPasswordEvent.fire(new UpdatedUserPasswordEvent(passwordHistory, this.getUserPassword()));
+
                // Clear bean
                this.clear();
 
index 013537686508116ecf2c9698b59fcae59bd38441..cd04960606d12af2ee65db40bbd75f8e90d4a67a 100644 (file)
@@ -260,25 +260,28 @@ public class FinancialsUserRegisterWebRequestBean extends BaseFinancialsBean imp
                        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 e13542a6addb7dd975646c7f8c4519aef7b97769..3ea29a34b8cdb17c50aa31e61570466bda6819b5 100644 (file)
@@ -42,17 +42,8 @@ public class FinancialsBasicCompanyDataConverter 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(FinancialsBasicDataListWebViewBean.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 FinancialsBasicCompanyDataConverter 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(FinancialsBasicDataListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long basicDataId = Long.valueOf(submittedValue);
index 5d661f630a8bceaad87aae4bd1771c127f8c820b..555146ad92fcd7097ef6080514aeb9bbb0f2df95 100644 (file)
@@ -42,17 +42,8 @@ public class FinancialsBranchOfficeConverter 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(FinancialsBranchOfficeListWebViewBean.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 FinancialsBranchOfficeConverter 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(FinancialsBranchOfficeListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long branchOfficeId = Long.valueOf(submittedValue);
index e84e76cf6f1b67144d7a7ccd130f7e7df41e6c59..66820f991235c145a839014821bedfa0b4b148d4 100644 (file)
@@ -44,9 +44,6 @@ public class FinancialsDepartmentConverter 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 FinancialsDepartmentConverter 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(FinancialsDepartmentListWebViewBean.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(FinancialsDepartmentListWebViewBean.class).get();
-                       }
-
                        // Try to get user instance from it
                        companyDepartment = DEPARTMENT_LIST_CONTROLLER.findDepartmentById(departmentId);
                } catch (final NumberFormatException ex) {
index 0c40f09fa8aa8d93640a942d588bd93e57143f2c..0a3485d15dd35d98a1e2b346a5276fee04dd0f93 100644 (file)
@@ -51,16 +51,16 @@ public class FinancialsEmployeeConverter 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(FinancialsEmployeeListWebViewBean.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(FinancialsEmployeeListWebViewBean.class).get();
-                       }
-
                        // Try to get user instance from it
                        companyEmployee = EMPLOYEE_LIST_CONTROLLER.findEmployeeById(employeeId);
                } catch (final NumberFormatException ex) {
index 7b07d31267b8716ce90a497ceec1c0832bd108bc..4749d6a72afd75d991d36318463ed1152d520af6 100644 (file)
@@ -42,19 +42,25 @@ public class FinancialsHeadquarterConverter 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(FinancialsHeadquarterListWebViewBean.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(FinancialsHeadquarterListWebViewBean.class).get();
-                       }
-
                        // Try to get user instance from it
                        headquarter = HEADQUARTER_LIST_CONTROLLER.findHeadquarterById(headquarterId);
                } catch (final NumberFormatException ex) {
index 86bbc8efeda4f3a4196ebf20b56c58059b77811b..6c23557d3653780cc4d5bbfe0b0f506e391dcaa4 100644 (file)
@@ -44,9 +44,6 @@ public class FinancialsCompanyOpeningTimeConverter implements Converter<OpeningT
        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 FinancialsCompanyOpeningTimeConverter implements Converter<OpeningT
                // 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(FinancialsOpeningTimeListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long openingTimeId = Long.valueOf(submittedValue);
 
-                       // Is the instance there?
-                       if (null == OPENING_TIME_LIST_CONTROLLER) {
-                               // Get bean from CDI directly
-                               OPENING_TIME_LIST_CONTROLLER = CDI.current().select(FinancialsOpeningTimeListWebViewBean.class).get();
-                       }
-
                        // Try to get user instance from it
                        openingTime = OPENING_TIME_LIST_CONTROLLER.findOpeningTimeById(openingTimeId);
                } catch (final NumberFormatException ex) {
index 752483757e640122e482a2adb16785b083fa21df..36d34e8e17f42e349ccdf0296870bbd2fac18207 100644 (file)
@@ -42,17 +42,8 @@ public class FinancialsContactConverter 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(FinancialsContactListWebViewBean.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 FinancialsContactConverter 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(FinancialsContactListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long contactId = Long.valueOf(submittedValue);
index 680c31fbfecf06e9779b1755bfb61d7055615c5e..076863269ca8836f6a22040a38ab8eb15ca6bc4a 100644 (file)
@@ -44,9 +44,6 @@ public class FinancialsCountryConverter 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 FinancialsCountryConverter 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(FinancialsCountryListWebViewBean.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(FinancialsCountryListWebViewBean.class).get();
-                       }
-
                        // Try to find it
                        country = COUNTRY_LIST_CONTROLLER.findCountryById(countryId);
                } catch (final NumberFormatException ex) {
index 2f486c4f465d7be097c68c2f757d6f724589061e..afdc0b15666cbe3e33be2537390d0e0c736a04e8 100644 (file)
@@ -51,16 +51,16 @@ public class FinancialsFaxNumberConverter 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(FinancialsPhoneListWebViewBean.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(FinancialsPhoneListWebViewBean.class).get();
-                       }
-
                        // Try to get mobile instance from it
                        faxNumber = PHONE_LIST_CONTROLLER.findFaxNumberById(faxNumberId);
                } catch (final NumberFormatException ex) {
index a0bab6339c4fbe28d6519b9be515efddc4f13dbd..8b77ef1a6322fddb4592e41d9d62018568460e95 100644 (file)
@@ -51,16 +51,16 @@ public class FinancialsLandLineNumberConverter implements Converter<DialableLand
                // 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(FinancialsPhoneListWebViewBean.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(FinancialsPhoneListWebViewBean.class).get();
-                       }
-
                        // Try to get mobile instance from it
                        landLineNumber = PHONE_LIST_CONTROLLER.findLandLineNumberById(landLineNumberId);
                } catch (final NumberFormatException ex) {
index 7ef25b09ebb15874fcf2c276763123aac9ee0ef9..ac1a8c25d73893aec736bfebc8e3c436517a4e20 100644 (file)
@@ -51,16 +51,16 @@ public class FinancialsMobileNumberConverter implements Converter<DialableMobile
                // 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(FinancialsMobileListWebViewBean.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(FinancialsMobileListWebViewBean.class).get();
-                       }
-
                        // Try to get mobile instance from it
                        mobileNumber = MOBILE_LIST_CONTROLLER.findMobileNumberById(mobileNumberId);
                } catch (final NumberFormatException ex) {
index 49e01d9f8370b64c8bc992252089834f772d42eb..638fab73362154a06ed485ff1e73eace0655c2a3 100644 (file)
@@ -51,17 +51,17 @@ public class FinancialsMobileProviderConverter implements Converter<MobileProvid
                // 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(FinancialsMobileProviderListWebViewBean.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(FinancialsMobileProviderListWebViewBean.class).get();
-                       }
-
                        // Lookup of mobile provider
                        mobileProvider = MOBILE_PROVIDER_LIST_CONTROLLER.findMobileProviderById(providerId);
                } catch (final NumberFormatException ex) {
index 6e1c50504d0b4b7c328c19dad8703727267f9a76..4dec06a4326b411301d59ba0126d22b31e591f05 100644 (file)
@@ -22,8 +22,8 @@ import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
 import javax.faces.convert.ConverterException;
 import javax.faces.convert.FacesConverter;
-import org.mxchange.jfinancials.beans.user.list.FinancialsUserListWebViewController;
 import org.mxchange.jfinancials.beans.user.list.FinancialsUserListWebViewBean;
+import org.mxchange.jfinancials.beans.user.list.FinancialsUserListWebViewController;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.model.user.User;
 
@@ -42,12 +42,6 @@ public class FinancialsUserConverter 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(FinancialsUserListWebViewBean.class).get();
-               }
-
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
                        // Warning message
@@ -60,6 +54,12 @@ public class FinancialsUserConverter 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(FinancialsUserListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long userId = Long.valueOf(submittedValue);
index 08f5ef92156c5016ac6457802e7fc12d6db12130..5c16d007660d8144dc4196774bae02eeedcc94c1 100644 (file)
@@ -811,7 +811,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.
@@ -1213,3 +1212,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 c5cef2c1a1d8e7bceb11f4a18c46019e731ebc28..293d341c7699e2d2c9d3ccd2c57c1e591ce8dd80 100644 (file)
@@ -795,7 +795,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.
@@ -1112,7 +1111,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:
@@ -1123,3 +1122,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.
diff --git a/web/WEB-INF/templates/admin/basic_data/admin_form_basic_data.tpl b/web/WEB-INF/templates/admin/basic_data/admin_form_basic_data.tpl
deleted file mode 100644 (file)
index 3d91a34..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-@TODO: title="#{msg.ADMIN_BASIC_DATA_LEGEND_TITLE}"
--->
-<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"
-       >
-
-       <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="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)}"
-                                               />
-                               </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)}"
-                                               />
-                               </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>
-</ui:composition>
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 5a3e5ee9b08f8ded4f529f16e6dc7bf5998d6fd4..681eb66f01181845f32a38592ef17d25c5b0e6d5 100644 (file)
@@ -41,7 +41,7 @@
                                        value="#{basicDataListController.allBasicData}"
                                        var="basicData"
                                        itemValue="#{basicData}"
-                                       itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+                                       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 a140c38bee8a73ed8b5901d8bd8e85583bf18a46..9f0e88456ca0b7775095855b621ccc8f86abe480 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}"
                                                >