]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Wed, 8 Apr 2020 18:29:11 +0000 (20:29 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 18 Apr 2020 01:11:15 +0000 (03:11 +0200)
- reformatted some p:outputLabel/p:inputText to have all attributes in single
  line
- as jcoreee's showFacesMessage() methods require severity now, added
  FacesMessage.SEVERITY_* to those method calls, strange that still it still
  shows no effect? Where is the bug here?

Signed-off-by: Roland Häder <roland@mxchange.org>
20 files changed:
src/java/org/mxchange/jjobs/beans/business/branchoffice/JobsAdminBranchOfficeWebRequestBean.java
src/java/org/mxchange/jjobs/beans/business/department/JobsAdminDepartmentWebRequestBean.java
src/java/org/mxchange/jjobs/beans/business/employee/JobsAdminEmployeeWebRequestBean.java
src/java/org/mxchange/jjobs/beans/business/headquarter/JobsAdminHeadquarterWebRequestBean.java
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebRequestBean.java
src/java/org/mxchange/jjobs/beans/contact/phone/JobsAdminContactPhoneWebRequestBean.java
src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java
src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java
src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java
src/java/org/mxchange/jjobs/beans/user/email_address/JobsEmailChangeWebRequestBean.java
src/java/org/mxchange/jjobs/beans/user/login/JobsUserLoginWebSessionBean.java
src/java/org/mxchange/jjobs/beans/user/password/JobsUserPasswordWebRequestBean.java
src/java/org/mxchange/jjobs/beans/user/register/JobsUserRegisterWebRequestBean.java
src/java/org/mxchange/jjobs/beans/user/resendlink/JobsResendLinkWebRequestBean.java
web/admin/basic_data/admin_basic_data_list.xhtml
web/admin/branch_office/admin_branch_office_list.xhtml
web/admin/contact/admin_contact_list.xhtml
web/admin/country/admin_country_list.xhtml
web/admin/department/admin_department_list.xhtml
web/admin/headquarter/admin_headquarter_list.xhtml

index 8a2c912ebf15758f466566d8174ef37c0eb015db..75a538c3056ded70e99b62092e00d1c4ddd78e5b 100644 (file)
@@ -24,6 +24,7 @@ import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.inject.Any;
+import javax.faces.application.FacesMessage;
 import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontactsbusiness.events.branchoffice.added.BranchOfficeAddedEvent;
@@ -236,7 +237,7 @@ public class JobsAdminBranchOfficeWebRequestBean extends BaseJobsBean implements
                // Is the branch office not created yet?
                if (this.isBranchOfficeCreatedByRequiredData(branchOffice)) {
                        // Then show proper faces message
-                       this.showFacesMessage("form-admin-add-branch-office:branchStreet", "ADMIN_BRANCH_OFFICE_ALREADY_CREATED"); //NOI18N
+                       this.showFacesMessage("form-admin-add-branch-office:branchStreet", "ADMIN_BRANCH_OFFICE_ALREADY_CREATED", FacesMessage.SEVERITY_WARN); //NOI18N
                        return;
                }
 
@@ -248,7 +249,7 @@ public class JobsAdminBranchOfficeWebRequestBean extends BaseJobsBean implements
                        updatedOffice = this.adminBranchOfficeBean.addBranchOffice(branchOffice);
                } catch (final BranchOfficeAlreadyAddedException ex) {
                        // Output message
-                       this.showFacesMessage("form-admin-add-branch-office:branchStreet", "ADMIN_BRANCH_OFFICE_ALREADY_CREATED"); //NOI18N
+                       this.showFacesMessage("form-admin-add-branch-office:branchStreet", "ADMIN_BRANCH_OFFICE_ALREADY_CREATED", FacesMessage.SEVERITY_ERROR); //NOI18N
                        return;
                }
 
@@ -285,7 +286,7 @@ public class JobsAdminBranchOfficeWebRequestBean extends BaseJobsBean implements
                // Is same found?
                if (this.isSameOpeningTimeFound(openingTime)) {
                        // Yes then abort here
-                       this.showFacesMessage("form-admin-add-branch-opening-time:openingStartDay", "ADMIN_OPENING_TIME_ALREADY_CREATED"); //NOI18N
+                       this.showFacesMessage("form-admin-add-branch-opening-time:openingStartDay", "ADMIN_OPENING_TIME_ALREADY_CREATED", FacesMessage.SEVERITY_WARN); //NOI18N
                        return;
                }
 
index 0db3e12e3b4b2fa3233a3598300c5855466f0f7d..b55c66255e146b123232cb72800642eabf80b7fa 100644 (file)
@@ -20,6 +20,7 @@ import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.inject.Any;
+import javax.faces.application.FacesMessage;
 import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontactsbusiness.events.department.added.DepartmentAddedEvent;
@@ -119,7 +120,7 @@ public class JobsAdminDepartmentWebRequestBean extends BaseJobsBean implements J
                // Is the department not created yet?
                if (this.departmentListController.isDepartmentAlreadyAdded(department)) {
                        // Then show proper faces message
-                       this.showFacesMessage("form-admin-add-department:branchStreet", "ADMIN_DEPARTMENT_ALREADY_CREATED"); //NOI18N
+                       this.showFacesMessage("form-admin-add-department:branchStreet", "ADMIN_DEPARTMENT_ALREADY_CREATED", FacesMessage.SEVERITY_WARN); //NOI18N
                        return;
                }
 
@@ -131,7 +132,7 @@ public class JobsAdminDepartmentWebRequestBean extends BaseJobsBean implements J
                        updatedDepartment = this.adminDepartmentBean.addDepartment(department);
                } catch (final DepartmentAlreadyAddedException ex) {
                        // Output message
-                       this.showFacesMessage("form-admin-add-department:departmentI18nKey", "ADMIN_DEPARTMENT_ALREADY_CREATED"); //NOI18N
+                       this.showFacesMessage("form-admin-add-department:departmentI18nKey", "ADMIN_DEPARTMENT_ALREADY_CREATED", FacesMessage.SEVERITY_ERROR); //NOI18N
                        return;
                }
 
index c2859de220ff98b247bb56100da803b8daf7e33d..daba8d86ebfff468e33d4987e2d5e6931bdf2860 100644 (file)
@@ -20,6 +20,7 @@ import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.inject.Any;
+import javax.faces.application.FacesMessage;
 import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontacts.model.contact.Contact;
@@ -149,7 +150,7 @@ public class JobsAdminEmployeeWebRequestBean extends BaseJobsBean implements Job
                // Is the branch office not created yet?
                if (this.isEmployeeCreatedByRequiredData(employee)) {
                        // Then show proper faces message
-                       this.showFacesMessage("form-admin-add-employee:employeeNumber", "ADMIN_EMPLOYEE_ALREADY_CREATED"); //NOI18N
+                       this.showFacesMessage("form-admin-add-employee:employeeNumber", "ADMIN_EMPLOYEE_ALREADY_CREATED", FacesMessage.SEVERITY_WARN); //NOI18N
                        return;
                }
 
@@ -161,7 +162,7 @@ public class JobsAdminEmployeeWebRequestBean extends BaseJobsBean implements Job
                        updatedOffice = this.adminEmployeeBean.addEmployee(employee);
                } catch (final EmployeeAlreadyAddedException ex) {
                        // Output message
-                       this.showFacesMessage("form-admin-add-employee:employeeNumber", "ADMIN_EMPLOYEE_ALREADY_CREATED"); //NOI18N
+                       this.showFacesMessage("form-admin-add-employee:employeeNumber", "ADMIN_EMPLOYEE_ALREADY_CREATED", FacesMessage.SEVERITY_ERROR); //NOI18N
                        return;
                }
 
index af5b9e155cacd0eed4126c0d4ecaa8c08d9cfa6c..580f601ca78572d2c3b7e42be0ce6ee2139be44b 100644 (file)
@@ -24,6 +24,7 @@ import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.inject.Any;
+import javax.faces.application.FacesMessage;
 import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontactsbusiness.events.headquarter.added.HeadquarterAddedEvent;
@@ -224,7 +225,7 @@ public class JobsAdminHeadquarterWebRequestBean extends BaseJobsBean implements
                // Is the headquarter not created yet?
                if (this.headquarterListController.isHeadquarterCreatedByRequiredData(headquarter)) {
                        // Then show proper faces message
-                       this.showFacesMessage("form-admin-add-headquarter-office:headquarterStreet", "ADMIN_HEADQUARTER_ALREADY_CREATED"); //NOI18N
+                       this.showFacesMessage("form-admin-add-headquarter-office:headquarterStreet", "ADMIN_HEADQUARTER_ALREADY_CREATED", FacesMessage.SEVERITY_WARN); //NOI18N
                        return;
                }
 
@@ -236,7 +237,7 @@ public class JobsAdminHeadquarterWebRequestBean extends BaseJobsBean implements
                        updatedHeadquarter = this.adminHeadquarterBean.addHeadquarter(headquarter);
                } catch (final HeadquarterAlreadyAddedException ex) {
                        // Output message
-                       this.showFacesMessage("form-admin-add-headquarter-office:headquarterStreet", "ADMIN_HEADQUARTER_ALREADY_CREATED"); //NOI18N
+                       this.showFacesMessage("form-admin-add-headquarter-office:headquarterStreet", "ADMIN_HEADQUARTER_ALREADY_CREATED", FacesMessage.SEVERITY_ERROR); //NOI18N
                        return;
                }
 
@@ -273,7 +274,7 @@ public class JobsAdminHeadquarterWebRequestBean extends BaseJobsBean implements
                // Is same found?
                if (this.isSameOpeningTimeFound(openingTime)) {
                        // Yes then abort here
-                       this.showFacesMessage("form-admin-add-headquarter-opening-time:openingStartDay", "ADMIN_OPENING_TIME_ALREADY_CREATED"); //NOI18N
+                       this.showFacesMessage("form-admin-add-headquarter-opening-time:openingStartDay", "ADMIN_OPENING_TIME_ALREADY_CREATED", FacesMessage.SEVERITY_WARN); //NOI18N
                        return;
                }
 
index f3ea2e71a1cbb6debbe0e2f5cc0f845da0cc162f..1407ed67914ce55bae39ce20026812d0b7fc66fd 100644 (file)
@@ -22,6 +22,7 @@ import java.util.Objects;
 import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Observes;
+import javax.faces.application.FacesMessage;
 import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -396,7 +397,7 @@ public class JobsContactWebRequestBean extends BaseJobsBean implements JobsConta
                        throw new FaceletException("Not all required fields are set."); //NOI18N
                } else if (!this.userLoginController.ifCurrentPasswordMatches()) {
                        // Password not matching
-                       this.showFacesMessage("form_login_change_personal:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser())); //NOI18N
+                       this.showFacesMessage("form_login_change_personal:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()), FacesMessage.SEVERITY_ERROR); //NOI18N
                        return ""; //NOI18N
                }
 
index f656bb3d8985a5d51dd1e37482eb79ce2ce709a8..33f9048e6e0b4cf7f03d70115c6cb50b551f7dfb 100644 (file)
@@ -23,6 +23,7 @@ import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.event.Observes;
 import javax.enterprise.inject.Any;
+import javax.faces.application.FacesMessage;
 import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
@@ -461,7 +462,7 @@ public class JobsAdminContactPhoneWebRequestBean extends BaseJobsBean implements
                        updatedContact = this.adminContactPhoneBean.linkNewFaxNumberWithContact(targetContact, number);
                } catch (final PhoneNumberAlreadyLinkedException ex) {
                        // Throw again as cause
-                       this.showFacesMessage("form_add_contact_fax:faxNumber", ex); //NOI18N
+                       this.showFacesMessage("form_add_contact_fax:faxNumber", ex, FacesMessage.SEVERITY_ERROR); //NOI18N
                        return ""; //NOI18N
                }
 
@@ -525,7 +526,7 @@ public class JobsAdminContactPhoneWebRequestBean extends BaseJobsBean implements
                        updatedContact = this.adminContactPhoneBean.linkNewLandLineNumberWithContact(targetContact, number);
                } catch (final PhoneNumberAlreadyLinkedException ex) {
                        // Throw again as cause
-                       this.showFacesMessage("form_add_contact_landLine:landLineNumber", ex); //NOI18N
+                       this.showFacesMessage("form_add_contact_landLine:landLineNumber", ex, FacesMessage.SEVERITY_ERROR); //NOI18N
                        return ""; //NOI18N
                }
 
@@ -582,7 +583,7 @@ public class JobsAdminContactPhoneWebRequestBean extends BaseJobsBean implements
                        updatedContact = this.adminContactPhoneBean.linkNewMobileNumberWithContact(targetContact, number);
                } catch (final PhoneNumberAlreadyLinkedException ex) {
                        // Throw again as cause
-                       this.showFacesMessage("form_add_contact_mobile:mobileNumber", ex); //NOI18N
+                       this.showFacesMessage("form_add_contact_mobile:mobileNumber", ex, FacesMessage.SEVERITY_ERROR); //NOI18N
                        return ""; //NOI18N
                }
 
@@ -817,7 +818,7 @@ public class JobsAdminContactPhoneWebRequestBean extends BaseJobsBean implements
                        updatedContact = this.adminContactPhoneBean.unlinkFaxDataFromContact(this.getContact(), number);
                } catch (final PhoneNumberNotLinkedException ex) {
                        // Did not work
-                       this.showFacesMessage("form_unlink_contact_fax:faxNumberId", ex); //NOI18N
+                       this.showFacesMessage("form_unlink_contact_fax:faxNumberId", ex, FacesMessage.SEVERITY_ERROR); //NOI18N
                        return ""; //NOI18N
                }
 
@@ -872,7 +873,7 @@ public class JobsAdminContactPhoneWebRequestBean extends BaseJobsBean implements
                        updatedContact = this.adminContactPhoneBean.unlinkLandLineDataFromContact(this.getContact(), number);
                } catch (final PhoneNumberNotLinkedException ex) {
                        // Did not work
-                       this.showFacesMessage("form_unlink_contact_landLine:landLineNumberId", ex); //NOI18N
+                       this.showFacesMessage("form_unlink_contact_landLine:landLineNumberId", ex, FacesMessage.SEVERITY_ERROR); //NOI18N
                        return ""; //NOI18N
                }
 
@@ -936,7 +937,7 @@ public class JobsAdminContactPhoneWebRequestBean extends BaseJobsBean implements
                        updatedContact = this.adminContactPhoneBean.unlinkMobileDataFromContact(this.getContact(), number);
                } catch (final PhoneNumberNotLinkedException ex) {
                        // Did not work
-                       this.showFacesMessage("form_unlink_contact_mobile:mobileNumberId", ex); //NOI18N
+                       this.showFacesMessage("form_unlink_contact_mobile:mobileNumberId", ex, FacesMessage.SEVERITY_ERROR); //NOI18N
                        return ""; //NOI18N
                }
 
index 49f509a7da6ef1fd5ba2ebd74afa9228f08a8194..b66314fa94a28713484e8c1a1f8ce2ae8224edef 100644 (file)
  */
 package org.mxchange.jjobs.beans.mobileprovider;
 
-import java.util.Iterator;
-import java.util.List;
 import java.util.Objects;
 import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.inject.Any;
+import javax.faces.application.FacesMessage;
 import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -110,8 +109,8 @@ public class JobsAdminMobileProviderWebRequestBean extends BaseJobsBean implemen
                // Is the provider already created?
                if (this.isMobileProviderCreated(mobileProvider)) {
                        // Then throw exception
-                       this.showFacesMessage("form_add_mobile_provider:providerDialPrefix", new MobileProviderAlreadyAddedException(mobileProvider)); //NOI18N
-                       return; //NOI18N
+                       this.showFacesMessage("form_add_mobile_provider:providerDialPrefix", new MobileProviderAlreadyAddedException(mobileProvider), FacesMessage.SEVERITY_WARN); //NOI18N
+                       return;
                }
 
                // Init variable
@@ -213,19 +212,10 @@ public class JobsAdminMobileProviderWebRequestBean extends BaseJobsBean implemen
                // Default is not found
                boolean isFound = false;
 
-               // Get list of all providers
-               List<MobileProvider> providers = this.mobileController.allMobileProviders();
-
-               // Get iterator from it
-               Iterator<MobileProvider> iterator = providers.iterator();
-
                // Loop through all
-               while (iterator.hasNext()) {
-                       // Get next element
-                       MobileProvider next = iterator.next();
-
+               for (final MobileProvider currentMobileProvider : this.mobileController.allMobileProviders()) {
                        // Is the provider's dial prefix and country the same?
-                       if ((Objects.equals(mobileProvider.getProviderDialPrefix(), next.getProviderDialPrefix())) && (Objects.equals(mobileProvider.getProviderCountry(), next.getProviderCountry()))) {
+                       if (Objects.equals(mobileProvider, currentMobileProvider)) {
                                // Is the same, abort loop
                                isFound = true;
                                break;
index f880468115fbac09ee5f308168a49935838005ab..cc089f358f34a7e3053ee42822d7b13ad46d330c 100644 (file)
@@ -25,6 +25,7 @@ import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.event.Observes;
 import javax.enterprise.inject.Any;
+import javax.faces.application.FacesMessage;
 import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcountry.model.data.Country;
@@ -538,7 +539,7 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsBean implements JobsAd
                // Is the mobile provider and number the same?
                if ((Objects.equals(this.getPhoneCountry(), number.getPhoneCountry())) && (Objects.equals(this.getPhoneAreaCode(), number.getPhoneAreaCode())) && (Objects.equals(this.getPhoneNumber(), number.getPhoneNumber()))) {
                        // Show message
-                       this.showFacesMessage("form_edit_fax:faxNumber", "ERROR_ADMIN_NO_CHANGE_ENTERED"); //NOI18N
+                       this.showFacesMessage("form_edit_fax:faxNumber", "ERROR_ADMIN_NO_CHANGE_ENTERED", FacesMessage.SEVERITY_WARN); //NOI18N
 
                        // No difference in both together, no need to edit
                        return ""; //NOI18N
@@ -604,7 +605,7 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsBean implements JobsAd
                // Is the mobile provider and number the same?
                if ((Objects.equals(this.getPhoneCountry(), number.getPhoneCountry())) && (Objects.equals(this.getPhoneAreaCode(), number.getPhoneAreaCode())) && (Objects.equals(this.getPhoneNumber(), number.getPhoneNumber()))) {
                        // Show message
-                       this.showFacesMessage("form_edit_landline:landLineNumber", "ERROR_ADMIN_NO_CHANGE_ENTERED"); //NOI18N
+                       this.showFacesMessage("form_edit_landline:landLineNumber", "ERROR_ADMIN_NO_CHANGE_ENTERED", FacesMessage.SEVERITY_WARN); //NOI18N
 
                        // No difference in both together, no need to edit
                        return ""; //NOI18N
@@ -660,9 +661,8 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsBean implements JobsAd
                        // Throw NPE again
                        throw new NullPointerException(MessageFormat.format("mobileNumber.phoneNumber={0} is not valid.", number.getPhoneNumber())); //NOI18N
                } else if (this.getMobileProvider() == null) {
-                       // Not provided
-                       this.showFacesMessage("form_edit_mobile:mobileProvider", "ERROR_ADMIN_NO_MOBILE_PROVIDER_SELECTED"); //NOI18N
-                       return ""; //NOI18N
+                       // Throw NPE again
+                       throw new NullPointerException("this.mobileProvider is null"); //NOI18N
                } else if (this.getMobileProvider().getProviderId() == null) {
                        // Throw NPE again ...
                        throw new NullPointerException("this.mobileProvider.providerId is null"); //NOI18N
@@ -670,15 +670,14 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsBean implements JobsAd
                        // Invalid id number
                        throw new IllegalArgumentException(MessageFormat.format("this.mobileProvider.providerId={0} is not valid.", this.getMobileProvider().getProviderId())); //NOI18N
                } else if (this.getPhoneNumber() == null) {
-                       // Not provided
-                       this.showFacesMessage("form_edit_mobile:mobileNumber", "ERROR_ADMIN_EMPTY_MOBILE_NUMBER"); //NOI18N
-                       return ""; //NOI18N
+                       // Throw NPE
+                       throw new NullPointerException("this.phoneNumber is null"); //NOI18N
                }
 
                // Is the mobile provider and number the same?
                if ((Objects.equals(this.getMobileProvider(), number.getMobileProvider())) && (Objects.equals(this.getPhoneNumber(), number.getPhoneNumber()))) {
                        // Show message
-                       this.showFacesMessage("form_edit_mobile:mobileNumber", "ERROR_ADMIN_NO_CHANGE_ENTERED"); //NOI18N
+                       this.showFacesMessage("form_edit_mobile:mobileNumber", "ERROR_ADMIN_NO_CHANGE_ENTERED", FacesMessage.SEVERITY_WARN); //NOI18N
 
                        // No difference in both together, no need to edit
                        return ""; //NOI18N
index 5c5f31241e807e4f499ae7b508c3c2bdfcc0a35d..b25488b59a727b5ecd95743be8e96515c9896254 100644 (file)
@@ -25,6 +25,7 @@ import javax.enterprise.event.Event;
 import javax.enterprise.event.Observes;
 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;
@@ -240,7 +241,7 @@ public class JobsAdminUserWebRequestBean extends BaseJobsBean implements JobsAdm
                        throw new FaceletException(new UserNameAlreadyRegisteredException(newUser));
                } else if ((this.getContact() == null) && (this.contactController.isEmailAddressRegistered(newUser.getUserContact()))) {
                        // Email address is already used
-                       this.showFacesMessage("admin_add_user:emailAddress", "ERROR_EMAIL_ADDRESS_ALREADY_USED"); //NOI18N
+                       this.showFacesMessage("admin_add_user:emailAddress", "ERROR_EMAIL_ADDRESS_ALREADY_USED", FacesMessage.SEVERITY_WARN); //NOI18N
 
                        // Always clear password
                        this.setUserPassword(null);
@@ -390,14 +391,14 @@ public class JobsAdminUserWebRequestBean extends BaseJobsBean implements JobsAdm
                        this.setUserPasswordRepeat(null);
 
                        // Not same password entered
-                       this.showFacesMessage("form_edit_user:userPassword", "ADMIN_USER_PASSWORD_REPEAT_DIFFERENT"); //NOI18N
+                       this.showFacesMessage("form_edit_user:userPassword", "ADMIN_USER_PASSWORD_REPEAT_DIFFERENT", FacesMessage.SEVERITY_INFO); //NOI18N
                        return;
                } else if ((!Objects.equals(this.getUser().getUserName(), this.getUserName())) && (this.userBean.ifUserNameExists(this.getUserName()))) {
                        // Clear all fields
                        this.clear();
 
                        // User name already exists
-                       this.showFacesMessage("form_edit_user:userName", "ADMIN_USER_NAME_ALREADY_EXISTS"); //NOI18N
+                       this.showFacesMessage("form_edit_user:userName", "ADMIN_USER_NAME_ALREADY_EXISTS", FacesMessage.SEVERITY_WARN); //NOI18N
                        return;
                } else if (this.isSamePasswordEntered()) {
                        // Same password entered, create container
@@ -407,7 +408,7 @@ public class JobsAdminUserWebRequestBean extends BaseJobsBean implements JobsAdm
                                this.setUserPasswordRepeat(null);
 
                                // Same password entered
-                               this.showFacesMessage("form_edit_user:userPassword", "ADMIN_USER_ENTERED_SAME_AS_OLD_PASSWORD"); //NOI18N
+                               this.showFacesMessage("form_edit_user:userPassword", "ADMIN_USER_ENTERED_SAME_AS_OLD_PASSWORD", FacesMessage.SEVERITY_WARN); //NOI18N
                                return;
                        }
 
index a916b3a574a9efb02b283b1ce4edfd105af5fa51..9f689a6a63ca4c9c2ceef8c2408b1e12a32c0e95 100644 (file)
@@ -23,6 +23,7 @@ import javax.annotation.PostConstruct;
 import javax.cache.Cache;
 import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
+import javax.faces.application.FacesMessage;
 import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -112,11 +113,11 @@ public class JobsEmailChangeWebRequestBean extends BaseJobsBean implements JobsE
                        throw new FaceletException("Not all required fields are set."); //NOI18N
                } else if (!Objects.equals(this.getEmailAddress(), this.getEmailAddressRepeat())) {
                        // Email address 1+2 mismatch
-                       this.showFacesMessage("form_user_change_email_address:emailAddressRepeat", "ERROR_USER_EMAIL_ADDRESSES_MISMATCH"); //NOI18N
+                       this.showFacesMessage("form_user_change_email_address:emailAddressRepeat", "ERROR_USER_EMAIL_ADDRESSES_MISMATCH", FacesMessage.SEVERITY_WARN); //NOI18N
                        return ""; //NOI18N
                } else if (!this.userLoginController.ifCurrentPasswordMatches()) {
                        // Password not matching
-                       this.showFacesMessage("form_login_user_change_email_address:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser())); //NOI18N
+                       this.showFacesMessage("form_login_user_change_email_address:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()), FacesMessage.SEVERITY_WARN); //NOI18N
                        return ""; //NOI18N
                }
 
@@ -138,7 +139,7 @@ public class JobsEmailChangeWebRequestBean extends BaseJobsBean implements JobsE
                        this.setEmailAddressRepeat(null);
 
                        // Yes, then abort here
-                       this.showFacesMessage("form_user_change_email_address:emailAddress", "ERROR_USER_CHANGE_EMAIL_ADDRESS_ALREADY_QUEUED"); //NOI18N
+                       this.showFacesMessage("form_user_change_email_address:emailAddress", "ERROR_USER_CHANGE_EMAIL_ADDRESS_ALREADY_QUEUED", FacesMessage.SEVERITY_ERROR); //NOI18N
                        return ""; //NOI18N
                }
 
index 8c290cc02394d1f6d37b47b118643ad716eaac48..adf2e69b366d3fe58cc12ca4d6607ba16431d289 100644 (file)
@@ -25,6 +25,7 @@ import javax.enterprise.context.SessionScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.event.Observes;
 import javax.enterprise.inject.Any;
+import javax.faces.application.FacesMessage;
 import javax.faces.context.FacesContext;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -226,17 +227,17 @@ public class JobsUserLoginWebSessionBean extends BaseJobsBean implements JobsUse
                        return "login_user"; //NOI18N
                } catch (final UserNotFoundException ex) {
                        // Show JSF message
-                       this.showFacesMessage("form_user_login:userName", "ERROR_USER_NOT_FOUND"); //NOI18N
+                       this.showFacesMessage("form_user_login:userName", "ERROR_USER_NOT_FOUND", FacesMessage.SEVERITY_ERROR); //NOI18N
                        return ""; //NOI18N
                } catch (final UserStatusLockedException ex) {
-                       this.showFacesMessage("form_user_login:userName", "ERROR_USER_STATUS_LOCKED"); //NOI18N
+                       this.showFacesMessage("form_user_login:userName", "ERROR_USER_STATUS_LOCKED", FacesMessage.SEVERITY_WARN); //NOI18N
                        return ""; //NOI18N
                } catch (final UserStatusUnconfirmedException ex) {
-                       this.showFacesMessage("form_user_login:userName", "ERROR_USER_STATUS_UNCONFIRMED"); //NOI18N
+                       this.showFacesMessage("form_user_login:userName", "ERROR_USER_STATUS_UNCONFIRMED", FacesMessage.SEVERITY_INFO); //NOI18N
                        return ""; //NOI18N
                } catch (final UserPasswordMismatchException ex) {
                        // Show JSF message
-                       this.showFacesMessage("form_user_login:userPassword", "ERROR_USER_PASSWORD_MISMATCH"); //NOI18N
+                       this.showFacesMessage("form_user_login:userPassword", "ERROR_USER_PASSWORD_MISMATCH", FacesMessage.SEVERITY_WARN); //NOI18N
                        return ""; //NOI18N
                }
        }
index e88410b401949d28aa90716bb83be8aecbd02377..22c28a8e6165f425053bd98dbb3dda6cfadf531c 100644 (file)
@@ -21,6 +21,7 @@ import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.inject.Any;
+import javax.faces.application.FacesMessage;
 import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -124,7 +125,7 @@ public class JobsUserPasswordWebRequestBean extends BaseJobsBean implements Jobs
                        throw new IllegalStateException("User tried to change password."); //NOI18N
                } else if (!UserLoginUtils.ifPasswordMatches(this.getUserCurrentPassword(), this.userLoginController.getLoggedInUser())) {
                        // Password mismatches
-                       this.showFacesMessage("form_user_change_password:userCurrentPassword", "Entered current password does not matched stored password."); //NOI18N
+                       this.showFacesMessage("form_user_change_password:userCurrentPassword", "Entered current password does not matched stored password.", FacesMessage.SEVERITY_WARN); //NOI18N
 
                        // Clear bean
                        this.clear();
@@ -133,7 +134,7 @@ public class JobsUserPasswordWebRequestBean extends BaseJobsBean implements Jobs
                        return ""; //NOI18N
                } else if (!Objects.equals(this.getUserPassword(), this.getUserPasswordRepeat())) {
                        // Both entered passwords don't match
-                       this.showFacesMessage("form_user_change_password:userPasswordRepeat", "Entered new passwords mismatch."); //NOI18N
+                       this.showFacesMessage("form_user_change_password:userPasswordRepeat", "Entered new passwords mismatch.", FacesMessage.SEVERITY_ERROR); //NOI18N
 
                        // Clear bean
                        this.clear();
@@ -142,7 +143,7 @@ public class JobsUserPasswordWebRequestBean extends BaseJobsBean implements Jobs
                        return ""; //NOI18N
                } else if (Objects.equals(this.getUserCurrentPassword(), this.getUserPassword())) {
                        // New password matches current
-                       this.showFacesMessage("form_user_change_password:userPassword", "Entered new password is same as current password."); //NOI18N
+                       this.showFacesMessage("form_user_change_password:userPassword", "Entered new password is same as current password.", FacesMessage.SEVERITY_WARN); //NOI18N
 
                        // Clear bean
                        this.clear();
@@ -151,7 +152,7 @@ public class JobsUserPasswordWebRequestBean extends BaseJobsBean implements Jobs
                        return ""; //NOI18N
                } else if (this.userLoginController.isPasswordInHistory(this.getUserPassword())) {
                        // Is already in list (to old passwords are ignored)
-                       this.showFacesMessage("form_user_change_password:userPassword", "Entered new password is has already been used some time ago."); //NOI18N
+                       this.showFacesMessage("form_user_change_password:userPassword", "Entered new password is has already been used some time ago.", FacesMessage.SEVERITY_WARN); //NOI18N
 
                        // Clear bean
                        this.clear();
index 01fe562c14ab5e126d73a165913387e82892e0d2..ec1513284eec1ca35ab64d340025e82d46f2d5e3 100644 (file)
@@ -20,6 +20,7 @@ import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.inject.Any;
+import javax.faces.application.FacesMessage;
 import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -158,7 +159,7 @@ public class JobsUserRegisterWebRequestBean extends BaseJobsBean implements Jobs
                                this.clearUserNameEvent.fire(new ClearUserNameEvent());
 
                                // Output message
-                               this.showFacesMessage("form_register_single:userName", "ERROR_USER_NAME_ALREADY_USED"); //NOI18N
+                               this.showFacesMessage("form_register_single:userName", "ERROR_USER_NAME_ALREADY_USED", FacesMessage.SEVERITY_WARN); //NOI18N
                                return ""; //NOI18N
                        }
                } else if (this.contactController.isEmailAddressRegistered(user.getUserContact())) {
@@ -169,7 +170,7 @@ public class JobsUserRegisterWebRequestBean extends BaseJobsBean implements Jobs
                        } else {
                                // May happen here, reset fields
                                this.contactController.clearEmailAddresses();
-                               this.showFacesMessage("form_register_single:emailAddressRepeat", "ERROR_EMAIL_ADDRESS_ALREADY_USED"); //NOI18N
+                               this.showFacesMessage("form_register_single:emailAddressRepeat", "ERROR_EMAIL_ADDRESS_ALREADY_USED", FacesMessage.SEVERITY_WARN); //NOI18N
                                return ""; //NOI18N
                        }
                } else if (!this.contactController.isSameEmailAddressEntered()) {
@@ -180,7 +181,7 @@ public class JobsUserRegisterWebRequestBean extends BaseJobsBean implements Jobs
                        } else {
                                // May happen here, reset fields
                                this.contactController.clearEmailAddresses();
-                               this.showFacesMessage("form_register_single:emailAddressRepeat", "ERROR_EMAIL_ADDRESSES_MISMATCHING"); //NOI18N
+                               this.showFacesMessage("form_register_single:emailAddressRepeat", "ERROR_EMAIL_ADDRESSES_MISMATCHING", FacesMessage.SEVERITY_INFO); //NOI18N
                                return ""; //NOI18N
                        }
                } else if (!this.userController.isSamePasswordEntered()) {
@@ -268,12 +269,12 @@ public class JobsUserRegisterWebRequestBean extends BaseJobsBean implements Jobs
                        this.clearUserNameEvent.fire(new ClearUserNameEvent());
 
                        // Output message
-                       this.showFacesMessage("form_register_page1:userName", "ERROR_USER_NAME_ALREADY_USED"); //NOI18N
+                       this.showFacesMessage("form_register_page1:userName", "ERROR_USER_NAME_ALREADY_USED", FacesMessage.SEVERITY_WARN); //NOI18N
                        return ""; //NOI18N
                } else if (!this.contactController.isSameEmailAddressEntered()) {
                        // Not same email address entered, clear both
                        this.contactController.clearEmailAddresses();
-                       this.showFacesMessage("form_register_page1:emailAddressRepeat", "ERROR_EMAIL_ADDRESSES_MISMATCHING"); //NOI18N
+                       this.showFacesMessage("form_register_page1:emailAddressRepeat", "ERROR_EMAIL_ADDRESSES_MISMATCHING", FacesMessage.SEVERITY_WARN); //NOI18N
                        return ""; //NOI18N
                } else if (!this.userController.isSamePasswordEntered()) {
                        // Is multi-page enabled?
@@ -282,8 +283,8 @@ public class JobsUserRegisterWebRequestBean extends BaseJobsBean implements Jobs
                                this.clearUserPasswordEvent.fire(new ClearUserPasswordEvent());
 
                                // Output faces message
-                               this.showFacesMessage("form_register_page1:userPassword", "ERROR_USER_PASSWORD_EMPTY"); //NOI18N
-                               this.showFacesMessage("form_register_page1:userPasswordRepeat", "ERROR_USER_PASSWORD_REPEAT_EMPTY"); //NOI18N
+                               this.showFacesMessage("form_register_page1:userPassword", "ERROR_USER_PASSWORD_EMPTY", FacesMessage.SEVERITY_WARN); //NOI18N
+                               this.showFacesMessage("form_register_page1:userPasswordRepeat", "ERROR_USER_PASSWORD_REPEAT_EMPTY", FacesMessage.SEVERITY_WARN); //NOI18N
                                return ""; //NOI18N
                        } else if (this.userController.ifBothPasswordsEmptyAllowed()) {
                                // Both passwords are left empty and is allowed, then generate a random password
@@ -308,7 +309,7 @@ public class JobsUserRegisterWebRequestBean extends BaseJobsBean implements Jobs
                if (this.contactController.isEmailAddressRegistered(user.getUserContact())) {
                        // Email address has already been taken, clear both
                        this.contactController.clearEmailAddresses();
-                       this.showFacesMessage("form_register_page1:emailAddress", "ERROR_EMAIL_ADDRESS_ALREADY_USED"); //NOI18N
+                       this.showFacesMessage("form_register_page1:emailAddress", "ERROR_EMAIL_ADDRESS_ALREADY_USED", FacesMessage.SEVERITY_WARN); //NOI18N
                        return ""; //NOI18N
                }
 
index 6c2feed1ab323be0ba945ec6917e127ce5c935d5..6478da0f6d4b8d02c3df687827d5313b1d42b30d 100644 (file)
@@ -22,6 +22,7 @@ import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.event.Observes;
 import javax.enterprise.inject.Any;
+import javax.faces.application.FacesMessage;
 import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcoreee.events.locale.ObservableLocaleChangeEvent;
@@ -133,7 +134,7 @@ public class JobsResendLinkWebRequestBean extends BaseJobsBean implements JobsRe
                        this.clear();
 
                        // Not found, should not happen as the registered validator should find it
-                       this.showFacesMessage("form_resend_link:", "ERROR_USER_EMAIL_ADDRESS_NOT_FOUND"); //NOI18N
+                       this.showFacesMessage("form_resend_link:", "ERROR_USER_EMAIL_ADDRESS_NOT_FOUND", FacesMessage.SEVERITY_ERROR); //NOI18N
                        return ""; //NOI18N
                }
 
@@ -143,14 +144,14 @@ public class JobsResendLinkWebRequestBean extends BaseJobsBean implements JobsRe
                        this.clear();
 
                        // Then abort here
-                       this.showFacesMessage("form_resend_link:resendEmailAddress", "ERROR_USER_STATUS_ALREADY_CONFIRMED"); //NOI18N
+                       this.showFacesMessage("form_resend_link:resendEmailAddress", "ERROR_USER_STATUS_ALREADY_CONFIRMED", FacesMessage.SEVERITY_WARN); //NOI18N
                        return ""; //NOI18N
                } else if (user.getUserAccountStatus() == UserAccountStatus.LOCKED) {
                        // Always clear bean
                        this.clear();
 
                        // User account is locked
-                       this.showFacesMessage("form_resend_link:resendEmailAddress", "ERROR_USER_STATUS_LOCKED"); //NOI18N
+                       this.showFacesMessage("form_resend_link:resendEmailAddress", "ERROR_USER_STATUS_LOCKED", FacesMessage.SEVERITY_WARN); //NOI18N
                        return ""; //NOI18N
                } else if (user.getUserConfirmKey() == null) {
                        // Status is UNCONFIRMED but confirmation key is NULL
@@ -168,11 +169,11 @@ public class JobsResendLinkWebRequestBean extends BaseJobsBean implements JobsRe
                        managedUser = this.resendLinkBean.resendConfirmationLink(user, this.getLocale(), baseUrl);
                } catch (final UserNotFoundException ex) {
                        // User not found
-                       this.showFacesMessage("form_resend_link:resendEmailAddress", "ERROR_USER_NOT_FOUND"); //NOI18N
+                       this.showFacesMessage("form_resend_link:resendEmailAddress", "ERROR_USER_NOT_FOUND", FacesMessage.SEVERITY_ERROR); //NOI18N
                        return ""; //NOI18N
                } catch (final UserStatusLockedException | UserStatusConfirmedException ex) {
                        // Output message, this should not happen as the confirmation key is being removed
-                       this.showFacesMessage("form_resend_link:resendEmailAddress", ex); //NOI18N
+                       this.showFacesMessage("form_resend_link:resendEmailAddress", ex, FacesMessage.SEVERITY_ERROR); //NOI18N
                        return ""; //NOI18N
                }
 
index 45ce0bc89def8b7bf3deff555818fb50b50f31da..dc05e52a34a0531841ec8c12b3aed1a78499873a 100644 (file)
                                                        layout="grid"
                                                        styleClass="ui-noborder"
                                                        >
-                                                       <p:outputLabel for="globalFilter" value="#{msg.SEARCH_ALL_FIELDS}" style="float: right" />
-                                                       <p:inputText id="globalFilter" onkeyup="PF('basicDataList').filter()" placeholder="#{msg.ENTER_KEYWORD}"/>
+                                                       <p:outputLabel
+                                                               for="globalFilter"
+                                                               value="#{msg.SEARCH_ALL_FIELDS}"
+                                                               style="float: right"
+                                                               />
+
+                                                       <p:inputText
+                                                               id="globalFilter"
+                                                               onkeyup="PF('basicDataList').filter()"
+                                                               placeholder="#{msg.ENTER_KEYWORD}"
+                                                               />
                                                </p:panelGrid>
 
                                                <p:outputPanel>
index 5abdb2b272b59f5760eebebbe47ed18e19de7a17..bbcb089350411b84b77001e536664a6750cbc649 100644 (file)
                                                        layout="grid"
                                                        styleClass="ui-noborder"
                                                        >
-                                                       <p:outputLabel for="globalFilter" value="#{msg.SEARCH_ALL_FIELDS}" style="float: right" />
-                                                       <p:inputText id="globalFilter" onkeyup="PF('branchOfficeList').filter()" placeholder="#{msg.ENTER_KEYWORD}"/>
+                                                       <p:outputLabel
+                                                               for="globalFilter"
+                                                               value="#{msg.SEARCH_ALL_FIELDS}"
+                                                               style="float: right"
+                                                               />
+
+                                                       <p:inputText
+                                                               id="globalFilter"
+                                                               onkeyup="PF('branchOfficeList').filter()"
+                                                               placeholder="#{msg.ENTER_KEYWORD}"
+                                                               />
                                                </p:panelGrid>
 
                                                <p:outputPanel>
index 9eb72bd3cff854172765616106c550adc9106370..f7c2d4ed73ee44b8e3cf7518d6e92d83d3d67350 100644 (file)
                                                        layout="grid"
                                                        styleClass="ui-noborder"
                                                        >
-                                                       <p:outputLabel for="globalFilter" value="#{msg.SEARCH_ALL_FIELDS}" style="float: right" />
-                                                       <p:inputText id="globalFilter" onkeyup="PF('contactList').filter()" placeholder="#{msg.ENTER_KEYWORD}"/>
+                                                       <p:outputLabel
+                                                               for="globalFilter"
+                                                               value="#{msg.SEARCH_ALL_FIELDS}"
+                                                               style="float: right"
+                                                               />
+
+                                                       <p:inputText
+                                                               id="globalFilter"
+                                                               onkeyup="PF('contactList').filter()"
+                                                               placeholder="#{msg.ENTER_KEYWORD}"
+                                                               />
                                                </p:panelGrid>
 
                                                <p:outputPanel>
index db3550ac92ce0292aa065575bdec8a92e1456750..eb34ffc2ffbd4cbfddbbd8beafc6b0c29f341f5f 100644 (file)
                                                        layout="grid"
                                                        styleClass="ui-noborder"
                                                        >
-                                                       <p:outputLabel for="globalFilter" value="#{msg.SEARCH_ALL_FIELDS}" style="float: right" />
-                                                       <p:inputText id="globalFilter" onkeyup="PF('countryList').filter()" placeholder="#{msg.ENTER_KEYWORD}"/>
+                                                       <p:outputLabel
+                                                               for="globalFilter"
+                                                               value="#{msg.SEARCH_ALL_FIELDS}"
+                                                               style="float: right"
+                                                               />
+
+                                                       <p:inputText
+                                                               id="globalFilter"
+                                                               onkeyup="PF('countryList').filter()"
+                                                               placeholder="#{msg.ENTER_KEYWORD}"
+                                                               />
                                                </p:panelGrid>
 
                                                <p:outputPanel>
index d3a51beea20219dabe6eef64d12859e0ffbe5c06..70dcbde4e40d59a5e2dbe7d9ea02ef18f212c517 100644 (file)
                                                        layout="grid"
                                                        styleClass="ui-noborder"
                                                        >
-                                                       <p:outputLabel for="globalFilter" value="#{msg.SEARCH_ALL_FIELDS}" style="float: right" />
-                                                       <p:inputText id="globalFilter" onkeyup="PF('departmentList').filter()" placeholder="#{msg.ENTER_KEYWORD}"/>
+                                                       <p:outputLabel
+                                                               for="globalFilter"
+                                                               value="#{msg.SEARCH_ALL_FIELDS}"
+                                                               style="float: right"
+                                                               />
+
+                                                       <p:inputText
+                                                               id="globalFilter"
+                                                               onkeyup="PF('departmentList').filter()"
+                                                               placeholder="#{msg.ENTER_KEYWORD}"
+                                                               />
                                                </p:panelGrid>
 
                                                <p:outputPanel>
index 089a71f1b1127cfb934c8cbd3df4e78db83bae3f..32d08e856d333e0d6c78aaa9f3a88650110c1a32 100644 (file)
                                                        layout="grid"
                                                        styleClass="ui-noborder"
                                                        >
-                                                       <p:outputLabel for="globalFilter" value="#{msg.SEARCH_ALL_FIELDS}" style="float: right" />
-                                                       <p:inputText id="globalFilter" onkeyup="PF('headquarterList').filter()" placeholder="#{msg.ENTER_KEYWORD}"/>
+                                                       <p:outputLabel
+                                                               for="globalFilter"
+                                                               value="#{msg.SEARCH_ALL_FIELDS}"
+                                                               style="float: right"
+                                                               />
+
+                                                       <p:inputText
+                                                               id="globalFilter"
+                                                               onkeyup="PF('departmentList').filter()"
+                                                               placeholder="#{msg.ENTER_KEYWORD}"
+                                                               />
                                                </p:panelGrid>
 
                                                <p:outputPanel>