]> git.mxchange.org Git - jjobs-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>
Thu, 2 Apr 2020 16:40:28 +0000 (18:40 +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/jjobs/validator/business/basicdata/JobsBasicDataCompanyNameValidator.java
src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyShortNameValidator.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 7c6c65f215c77d2d863fbc78e8df85201ca48eed..816658cb584610e17c16cff2ff0a2a227d7efd80 100644 (file)
@@ -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
index 8ebf829381c4d514d6dcb254b7b6de9cfbaf576d..06060a0925fad7bbee157675176a908e180b02f1 100644 (file)
@@ -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);
 
index b6c7a8b0dd31fd2edc10a0ec534b1e9a818d9c50..fe05c837104e519723f92c9987d8fd0a2f3391b0 100644 (file)
@@ -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:
index 4cae0e66f684d8291ca1f9ae8d336458aaa7fac6..4cf5bcdec35871dc8e16c516f640b3ca571abca6 100644 (file)
@@ -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:
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"