]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Wed, 1 Apr 2020 00:13:14 +0000 (02:13 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 1 Apr 2020 00:13:14 +0000 (02:13 +0200)
- 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 <roland@mxchange.org>
src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyNameValidator.java
src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyShortNameValidator.java
src/java/org/mxchange/localization/generic_de_DE.properties
src/java/org/mxchange/localization/generic_en_US.properties
web/admin/contact/admin_contact_list.xhtml

index 8705b0a30d32f85d07bbcd118310956ffd099d06..bd46fe3abe68c1ef826513108bdfb66b3a8aae6f 100644 (file)
@@ -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
index f22e03ded5979d19d056a48911dd9d405d72afcf..8468e5f0ee66ab5698a0983a4d4ce633b859dc6c 100644 (file)
@@ -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);
 
index dbc4924efbd8680679d7ccfc22cd34a95440da4f..ddfc9ef01220557c5aebdafb2a11849acc1c7bf3 100644 (file)
@@ -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:
index cc5ac8b6192b5d40c535d6825dd4e18ac00e5e91..b5233dfd344a483f2b7ea709e203b0ced38e47ec 100644 (file)
@@ -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:
index 86e0a2e48a1f656e4ee65751275f8e0591b35aa7..be91835cd402f807c7016105d122ec23feeb6e43 100644 (file)
                                </p:column>
 
                                <p:column
-                                       headerText="#{msg.ADMIN_CONTACT_USAGE}"
-                                       sortable="false"
-                                       filterable="false"
+                                       headerText="#{msg.ENTRY_CREATED_HEADER}"
+                                       sortBy="#{contact.contactCreated}"
+                                       filterBy="#{contact.contactCreated}"
+                                       filterMatchMode="contains"
                                        >
-                                       <h:outputText value="#{msg[beanHelper.getContactUsageMessageKey(contact)]}" />
+                                       <h:outputText value="#{contact.contactCreated}">
+                                               <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
+                                       </h:outputText>
                                </p:column>
 
                                <p:column
-                                       headerText="#{msg.ENTRY_CREATED_HEADER}"
-                                       sortBy="#{contact.contactCreated}"
-                                       filterBy="#{contact.contactCreated}"
+                                       headerText="#{msg.ENTRY_UPDATED_HEADER}"
+                                       sortBy="#{contact.contactUpdated}"
+                                       filterBy="#{contact.contactUpdated}"
                                        filterMatchMode="contains"
                                        >
-                                       <h:outputText id="contactCreated" value="#{contact.contactCreated}">
+                                       <h:outputText value="#{contact.contactUpdated}">
                                                <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
                                        </h:outputText>
                                </p:column>
 
+                               <p:column
+                                       headerText="#{msg.ADMIN_CONTACT_USAGE}"
+                                       sortable="false"
+                                       filterable="false"
+                                       >
+                                       <h:outputText value="#{msg[beanHelper.getContactUsageMessageKey(contact)]}" />
+                               </p:column>
+
                                <p:column
                                        headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
                                        sortable="false"