From: Roland Häder Date: Wed, 1 Apr 2020 00:13:14 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f3c1a51823f0c0bf1b4cd8fb561e5e59e4d5d842;p=jfinancials-war.git 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 Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyNameValidator.java b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyNameValidator.java index 8705b0a3..bd46fe3a 100644 --- a/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyNameValidator.java +++ b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyNameValidator.java @@ -65,7 +65,7 @@ public class FinancialsBasicDataCompanyNameValidator 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/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyShortNameValidator.java b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyShortNameValidator.java index f22e03de..8468e5f0 100644 --- a/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyShortNameValidator.java +++ b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyShortNameValidator.java @@ -47,12 +47,6 @@ public class FinancialsBasicDataCompanyShortNameValidator extends BaseStringVali @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(FinancialsBasicDataListWebViewBean.class).get(); - } - // All accepted, required fields final String[] requiredFields = {"companyShortName"}; //NOI18N @@ -65,7 +59,7 @@ public class FinancialsBasicDataCompanyShortNameValidator extends BaseStringVali // 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 FinancialsBasicDataCompanyShortNameValidator extends BaseStringVali 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(FinancialsBasicDataListWebViewBean.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 dbc4924e..ddfc9ef0 100644 --- a/src/java/org/mxchange/localization/generic_de_DE.properties +++ b/src/java/org/mxchange/localization/generic_de_DE.properties @@ -325,6 +325,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 cc5ac8b6..b5233dfd 100644 --- a/src/java/org/mxchange/localization/generic_en_US.properties +++ b/src/java/org/mxchange/localization/generic_en_US.properties @@ -308,6 +308,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 @@ - + + + - + + + + +