From 06c9320c51aea694ea5e18c4d5f20621748964d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 1 Apr 2020 02:13:14 +0200 Subject: [PATCH] Please cherry-pick: - initialize BASIC_DATA_LIST_CONTROLLER (and others, too) only right before it is needed. - added contactUpdated to "admin-contacts-list" view - contact usage (user/no user) is now pre-last column - added missing i18n string MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../JobsBasicDataCompanyNameValidator.java | 2 +- ...obsBasicDataCompanyShortNameValidator.java | 14 +++++----- .../localization/generic_de_DE.properties | 1 + .../localization/generic_en_US.properties | 1 + web/admin/contact/admin_contact_list.xhtml | 27 +++++++++++++------ 5 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyNameValidator.java b/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyNameValidator.java index 7c6c65f2..816658cb 100644 --- a/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyNameValidator.java +++ b/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyNameValidator.java @@ -65,7 +65,7 @@ public class JobsBasicDataCompanyNameValidator extends BaseStringValidator { // Default is to check on existing names Boolean checkExisting = Boolean.TRUE; - // Is attribute "allowEmptyRequiredData" set? + // Is attribute "checkExisting" set? if (component.getAttributes().containsKey("checkExisting")) { //NOI18N // Get attribute final Object attribute = component.getAttributes().get("checkExisting"); //NOI18N diff --git a/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyShortNameValidator.java b/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyShortNameValidator.java index 8ebf8293..06060a09 100644 --- a/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyShortNameValidator.java +++ b/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyShortNameValidator.java @@ -47,12 +47,6 @@ public class JobsBasicDataCompanyShortNameValidator extends BaseStringValidator @Override public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException { - // Is the instance there? - if (null == BASIC_DATA_LIST_CONTROLLER) { - // Get bean from CDI directly - BASIC_DATA_LIST_CONTROLLER = CDI.current().select(JobsBasicDataListWebViewBean.class).get(); - } - // All accepted, required fields final String[] requiredFields = {"companyShortName"}; //NOI18N @@ -65,7 +59,7 @@ public class JobsBasicDataCompanyShortNameValidator extends BaseStringValidator // Default is to check on existing names Boolean checkExisting = Boolean.TRUE; - // Is attribute "allowEmptyRequiredData" set? + // Is attribute "checkExisting" set? if (component.getAttributes().containsKey("checkExisting")) { //NOI18N // Get attribute final Object attribute = component.getAttributes().get("checkExisting"); //NOI18N @@ -80,6 +74,12 @@ public class JobsBasicDataCompanyShortNameValidator extends BaseStringValidator checkExisting = Boolean.parseBoolean((String) attribute); } + // Is the instance there? + if (null == BASIC_DATA_LIST_CONTROLLER) { + // Get bean from CDI directly + BASIC_DATA_LIST_CONTROLLER = CDI.current().select(JobsBasicDataListWebViewBean.class).get(); + } + // Check if name is already used final Boolean nameExists = BASIC_DATA_LIST_CONTROLLER.isCompanyShortNameUsed(companyShortName); diff --git a/src/java/org/mxchange/localization/generic_de_DE.properties b/src/java/org/mxchange/localization/generic_de_DE.properties index b6c7a8b0..fe05c837 100644 --- a/src/java/org/mxchange/localization/generic_de_DE.properties +++ b/src/java/org/mxchange/localization/generic_de_DE.properties @@ -341,6 +341,7 @@ ADMIN_LIST_MOBILE_PROVIDER_NAME=Name: ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX=Vorwahl: ADMIN_LIST_MOBILE_PROVIDER_COUNTRY=Land: ENTRY_CREATED_HEADER=Erstellt: +ENTRY_UPDATED_HEADER=Aktualisiert: ADMIN_LINK_EDIT_DELETE_MOBILE_PROVIDER_TITLE=Editieren oder l\u00f6schen des Handyanbieters ADMIN_USER_DATA_ENTER_PASSWORD=Passwort eingeben: ADMIN_USER_DATA_ENTER_PASSWORD_REPEAT=Passwort wiederholen: diff --git a/src/java/org/mxchange/localization/generic_en_US.properties b/src/java/org/mxchange/localization/generic_en_US.properties index 4cae0e66..4cf5bcde 100644 --- a/src/java/org/mxchange/localization/generic_en_US.properties +++ b/src/java/org/mxchange/localization/generic_en_US.properties @@ -315,6 +315,7 @@ ADMIN_LIST_MOBILE_PROVIDER_NAME=Name: ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX=Dial prefix: ADMIN_LIST_MOBILE_PROVIDER_COUNTRY=Country: ENTRY_CREATED_HEADER=Created: +ENTRY_UPDATED_HEADER=Updated: ADMIN_LINK_EDIT_DELETE_MOBILE_PROVIDER_TITLE=Edit or delete mobile provider ADMIN_USER_DATA_ENTER_PASSWORD=Enter password: ADMIN_USER_DATA_ENTER_PASSWORD_REPEAT=Repeat password: diff --git a/web/admin/contact/admin_contact_list.xhtml b/web/admin/contact/admin_contact_list.xhtml index 86e0a2e4..be91835c 100644 --- a/web/admin/contact/admin_contact_list.xhtml +++ b/web/admin/contact/admin_contact_list.xhtml @@ -134,24 +134,35 @@ - + + + - + + + + +