]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Tue, 19 Sep 2017 20:57:36 +0000 (22:57 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 19 Jul 2019 22:08:34 +0000 (00:08 +0200)
- let's split project-own and generic i18n strings into separate files so they
  don't interfer anymore with each other, having lesser cherry-pick conflicts
- converted some p:inputText again but into p:calendar for an upgraded way of
  entering some dates (like birthday date)
- nearly (?) all p:selectXxxMenu are now have each attribute in a separate line
  making them better readable
- also they can be filtered
- this whole PrimeFaces thing seem to have one big disadvantage: no more
  NoScript is possible with e.g. pagination, also "select" boxes are no longer
  rendered as <select> HTML tags, but now div, ul and li tags
- also mother PF tags with long list of attributes are now have each attribute
  in separate line. This makes changes lesser intrusive as not the whole line is
  considered as changed (by GIT) but only a line or 2 are just added.
- rewrote branchOffice controller to be fully compatible with sorting and
  filtering as the *same* list must be returned for making this fully working
- added converter of branch office entities for making above fully work (plus
  for many more purpose)
- ignored some text for i18n

Signed-off-by: Roland Häder <roland@mxchange.org>
21 files changed:
src/java/org/mxchange/jjobs/beans/business/branchoffice/JobsBranchOfficeWebRequestBean.java
src/java/org/mxchange/jjobs/converter/business/basicdata/JobsBusinessContactConverter.java
src/java/org/mxchange/jjobs/converter/business/branchoffice/JobsBranchOfficeConverter.java [new file with mode: 0644]
src/java/org/mxchange/jjobs/converter/business/company_employee/JobsCompanyEmployeeConverter.java
src/java/org/mxchange/jjobs/converter/business/headquarters/JobsCompanyHeadquartersConverter.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl
web/WEB-INF/resources/tags/admin/form_data/mobile/admin_form_mobile_data.tpl
web/WEB-INF/resources/tags/country/form_data/form_country_selector.tpl
web/WEB-INF/resources/tags/table_rows/mobile_selection_table_row.tpl
web/WEB-INF/resources/tags/table_rows/user_personal_title_table_row.tpl
web/WEB-INF/resources/tags/table_rows/user_profile_mode_table_row.tpl
web/WEB-INF/templates/admin/basic_company_data/admin_form_basic_company_data.tpl
web/WEB-INF/templates/admin/branch_offices/admin_form_branch_offices_data.tpl
web/WEB-INF/templates/base.tpl
web/WEB-INF/templates/contact/form_contact_data.tpl
web/admin/basic_company_data/admin_basic_company_data_list.xhtml
web/admin/branch_offices/admin_branch_offices_list.xhtml
web/admin/mobile_provider/admin_mobile_provider_list.xhtml
web/admin/user/admin_user_list.xhtml

index 29674be7a7f1bb7ff6b118405b1e994e7abf7c45..a6bd1be617eea96eeb71a6bb701d6c903c69e26b 100644 (file)
@@ -18,6 +18,7 @@ package org.mxchange.jjobs.beans.business.branchoffice;
 
 import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
+import java.util.Comparator;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
@@ -47,6 +48,11 @@ public class JobsBranchOfficeWebRequestBean extends BaseJobsController implement
         */
        private static final long serialVersionUID = 5_028_697_360_461L;
 
+       /**
+        * A list of all branch offices
+        */
+       private final List<BranchOffice> allBranchOffices;
+
        /**
         * EJB for administrative purposes
         */
@@ -60,12 +66,20 @@ public class JobsBranchOfficeWebRequestBean extends BaseJobsController implement
        @NamedCache (cacheName = "branchOfficeCache")
        private Cache<Long, BranchOffice> branchOfficeCache;
 
+       /**
+        * A list of filtered branch offices
+        */
+       private List<BranchOffice> filteredBranchOffices;
+
        /**
         * Default constructor
         */
        public JobsBranchOfficeWebRequestBean () {
                // Call super constructor
                super();
+
+               // Init list
+               this.allBranchOffices = new LinkedList<>();
        }
 
        /**
@@ -73,7 +87,8 @@ public class JobsBranchOfficeWebRequestBean extends BaseJobsController implement
         * <p>
         * @param event Event being fired
         * <p>
-        * @throws NullPointerException If the parameter or it's carried instance is null
+        * @throws NullPointerException If the parameter or it's carried instance is
+        * null
         * @throws IllegalArgumentException If the branchId is zero or lower
         */
        public void afterBranchOfficeAddedEvent (@Observes final ObservableBranchOfficeAddedEvent event) {
@@ -94,27 +109,33 @@ public class JobsBranchOfficeWebRequestBean extends BaseJobsController implement
 
                // Add instance to cache
                this.branchOfficeCache.put(event.getBranchOffice().getBranchId(), event.getBranchOffice());
+               this.allBranchOffices.add(event.getBranchOffice());
        }
 
        @Override
+       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
        public List<BranchOffice> allBranchOffices () {
-               // Init list
-               final List<BranchOffice> list = new LinkedList<>();
-
-               // Get iterator
-               final Iterator<Cache.Entry<Long, BranchOffice>> iterator = this.branchOfficeCache.iterator();
-
-               // Loop over all
-               while (iterator.hasNext()) {
-                       // Get next entry
-                       final Cache.Entry<Long, BranchOffice> next = iterator.next();
+               return this.allBranchOffices;
+       }
 
-                       // Add value to list
-                       list.add(next.getValue());
-               }
+       /**
+        * Getter for a list of filtered branch offices
+        * <p>
+        * @return Filtered branch offices
+        */
+       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+       public List<BranchOffice> getFilteredBranchOffices () {
+               return this.filteredBranchOffices;
+       }
 
-               // Return it
-               return list;
+       /**
+        * Setter for a list of filtered branch offices
+        * <p>
+        * @param filteredBranchOffices Filtered branch offices
+        */
+       @SuppressWarnings ("AssignmentToCollectionOrArrayFieldFromParameter")
+       public void setFilteredBranchOffices (final List<BranchOffice> filteredBranchOffices) {
+               this.filteredBranchOffices = filteredBranchOffices;
        }
 
        /**
@@ -136,6 +157,30 @@ public class JobsBranchOfficeWebRequestBean extends BaseJobsController implement
                                this.branchOfficeCache.put(next.getBranchId(), next);
                        }
                }
+
+               // Is the list empty, but filled cache?
+               if (this.allBranchOffices.isEmpty() && this.branchOfficeCache.iterator().hasNext()) {
+                       // Get iterator
+                       final Iterator<Cache.Entry<Long, BranchOffice>> iterator = this.branchOfficeCache.iterator();
+
+                       // Build up list
+                       while (iterator.hasNext()) {
+                               // GEt next element
+                               final Cache.Entry<Long, BranchOffice> next = iterator.next();
+
+                               // Add to list
+                               this.allBranchOffices.add(next.getValue());
+                       }
+
+                       // Sort list
+                       this.allBranchOffices.sort(new Comparator<BranchOffice>() {
+                               @Override
+                               public int compare (final BranchOffice o1, final BranchOffice o2) {
+                                       return o1.getBranchId() > o2.getBranchId() ? 1 : o1.getBranchId() < o2.getBranchId() ? -1 : 0;
+                               }
+                       }
+                       );
+               }
        }
 
 }
index c64d34e6d41fb3ba74d67591e98cb7160b95e3d1..5c91891776a41558c7476da0b7e2610935f5cbf0 100644 (file)
@@ -31,7 +31,7 @@ import org.mxchange.jcontactsbusiness.model.basicdata.BasicCompanyDataSessionBea
 import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
 
 /**
- * Converter for contact id <-> valid business contact instance
+ * Converter for basic company data id <-> valid basic company data instance
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
@@ -52,10 +52,10 @@ public class JobsBusinessContactConverter implements Converter<BusinessBasicData
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               BASIC_DATA_BEAN = (BasicCompanyDataSessionBeanRemote) initial.lookup("java:global/jjobs-ejb/basicCompanyData!org.mxchange.jcontactsbusiness.model.basicdata.BasicCompanyDataSessionBeanRemote");
+                               BASIC_DATA_BEAN = (BasicCompanyDataSessionBeanRemote) initial.lookup("java:global/jjobs-ejb/basicCompanyData!org.mxchange.jcontactsbusiness.model.basicdata.BasicCompanyDataSessionBeanRemote"); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
-                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup EJB", ex.getMessage()), ex);
+                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup EJB", ex.getMessage()), ex); //NOI18N
                        }
                }
 
diff --git a/src/java/org/mxchange/jjobs/converter/business/branchoffice/JobsBranchOfficeConverter.java b/src/java/org/mxchange/jjobs/converter/business/branchoffice/JobsBranchOfficeConverter.java
new file mode 100644 (file)
index 0000000..e22277c
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jjobs.converter.business.branchoffice;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.convert.FacesConverter;
+import javax.faces.validator.ValidatorException;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jcontactsbusiness.exceptions.branchoffice.BranchOfficeNotFoundException;
+import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
+import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOfficeSessionBeanRemote;
+
+/**
+ * Converter for branch office id <-> valid basic company data instance
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@FacesConverter ("BranchOfficeConverter")
+public class FinancialsBranchOfficeConverter implements Converter<BranchOffice> {
+
+       /**
+        * Branch office EJB
+        */
+       private static BranchOfficeSessionBeanRemote BRANCH_OFFICE_BEAN;
+
+       @Override
+       public BranchOffice getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
+               // Is the instance there?
+               if (BRANCH_OFFICE_BEAN == null) {
+                       try {
+                               // Not yet, attempt lookup
+                               final Context initial = new InitialContext();
+
+                               // Lookup EJB
+                               BRANCH_OFFICE_BEAN = (BranchOfficeSessionBeanRemote) initial.lookup("java:global/jjobs-ejb/branchOffice!org.mxchange.jcontactsbusiness.model.branchoffice.BranchOfficeSessionBeanRemote");
+                       } catch (final NamingException ex) {
+                               // Throw it again
+                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup EJB", ex.getMessage()), ex);
+                       }
+               }
+
+               // Is the value null or empty?
+               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
+                       // Warning message
+                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
+
+                       // Return null
+                       return null;
+               }
+
+               // Init instance
+               BranchOffice branchOffice = null;
+
+               try {
+                       // Try to parse the value as long
+                       final Long branchOfficeId = Long.valueOf(submittedValue);
+
+                       // Try to get user instance from it
+                       branchOffice = BRANCH_OFFICE_BEAN.findBranchOfficeById(branchOfficeId);
+               } catch (final NumberFormatException ex) {
+                       // Throw again
+                       throw new ConverterException(ex);
+               } catch (final BranchOfficeNotFoundException ex) {
+                       // Debug message
+                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject(): Exception: {1} - Returning null ...", this.getClass().getSimpleName(), ex)); //NOI18N
+               }
+
+               // Return it
+               return branchOffice;
+       }
+
+       @Override
+       public String getAsString (final FacesContext context, final UIComponent component, final BranchOffice value) {
+               // Is the object null?
+               if ((null == value) || (String.valueOf(value).isEmpty())) {
+                       // Is null
+                       return ""; //NOI18N
+               }
+
+               // Return id number
+               return String.valueOf(value.getBranchId());
+       }
+
+}
index 75f76972e2798135b0ff87f2f307e800780a19b9..9ef742b6eec75cc7dcc3c8cf36df613994b80edc 100644 (file)
@@ -52,10 +52,10 @@ public class JobsCompanyEmployeeConverter implements Converter<Employee> {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               COMPANY_EMPLOYEE_BEAN = (CompanyEmployeeSessionBeanRemote) initial.lookup("java:global/jjobs-ejb/companyEmployee!org.mxchange.jcontactsbusiness.model.employee.CompanyEmployeeSessionBeanRemote");
+                               COMPANY_EMPLOYEE_BEAN = (CompanyEmployeeSessionBeanRemote) initial.lookup("java:global/jjobs-ejb/companyEmployee!org.mxchange.jcontactsbusiness.model.employee.CompanyEmployeeSessionBeanRemote"); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
-                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup EJB", ex.getMessage()), ex);
+                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup EJB", ex.getMessage()), ex); //NOI18N
                        }
                }
 
index 6c2aca22ca5d1f6fe6e544bbb03531eaf7092aab..aaf6755cb191345356eb26cf8256d4f0b66b8cf5 100644 (file)
@@ -52,10 +52,10 @@ public class JobsCompanyHeadquartersConverter implements Converter<HeadquartersD
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               COMPANY_HEADQUARTERS_BEAN = (CompanyHeadquartersSessionBeanRemote) initial.lookup("java:global/jjobs-ejb/companyEmployee!org.mxchange.jcontactsbusiness.model.headquarters.CompanyHeadquartersSessionBeanRemote");
+                               COMPANY_HEADQUARTERS_BEAN = (CompanyHeadquartersSessionBeanRemote) initial.lookup("java:global/jjobs-ejb/companyEmployee!org.mxchange.jcontactsbusiness.model.headquarters.CompanyHeadquartersSessionBeanRemote"); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
-                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup EJB", ex.getMessage()), ex);
+                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup EJB", ex.getMessage()), ex); //NOI18N
                        }
                }
 
index 9c116087b32a9d527f504bec3a571d87817e6a19..cfe7e8f5bd86b88dfcbf61798ed03780b8e11c2f 100644 (file)
@@ -501,8 +501,7 @@ BUTTON_ADMIN_EXPORT_CONTACTS_XLS=Alle Daten als Excel-Datei exportieren
 LINK_ADMIN_EXPORT_CONTACT=Kontaktdaten exportieren
 LINK_ADMIN_EXPORT_CONTACT_TITLE=Kontaktdaten exportieren
 PERSONAL_DATA_BIRTHDAY=Geburtsdatum (tt.mm.jjjj):
-BIRTHDAY_PATTERN=dd.MM.yyyy
-INVALID_BIRTHDAY=Ung\u00fcltiges Geburtsdatum eingegeben.
+DATE_PATTERN=dd.MM.yyyy
 ADMIN_EXPORT_CONTACT_ID=Kontaktdaten-Id
 ADMIN_EXPORT_CONTACT_PERSONAL_TITLE=Anrede
 ADMIN_EXPORT_CONTACT_ACADEMIC_TITLE=Titel
@@ -812,7 +811,7 @@ TABLE_SUMMARY_ADMIN_LIST_BASIC_COMPANY_DATA=Tabelle listet Stammdaten auf.
 ADMIN_BASIC_COMPANY_DATA_ID=Id-Nummer:
 #@TODO Please fix German umlauts!
 ADMIN_LINK_SHOW_BASIC_COMAPNY_DATA_TITLE=Stammdaten des Unternehmens anzeigen.
-ADMIN_ASSIGNED_USER_ID=Zugew. Benutzer:
+ADMIN_ASSIGNED_USER=Zugew. Benutzer:
 ADMIN_LINK_SHOW_BASIC_COMPANY_DATA_OWNER_USER_TITLE=Benutzerprofil des zugewiesenen Benutzers anzeigen.
 ADMIN_LINK_ASSIGN=Zuweisen
 #@TODO Please fix German umlauts!
@@ -960,8 +959,15 @@ ADMIN_CONTACT_MOBILE_LIST_EMPTY=Es befinden sich keine Mobilfunknummern von Kont
 #@TODO Please fix German umlauts!
 ADMIN_MOBILE_PROVIDER_COUNTRY_REQUIRED=Bitte waehlen Sie ein Land fuer den Mobilfunkanbieter aus.
 #@TODO Please fix German umlauts!
-COUNTRIES=Laender
+LABEL_COUNTRIES=Laender
 #@TODO Please fix German umlauts!
 FILTER_BY_MULTIPLE_COUNTRY_TITLE=Liste durch Auswahl von ein oder mehr Laendern durchsuchen.
 ADMIN_LIST_MOBILE_PROVIDERS_HEADER=Liste aller Mobilfunkanbieter
 SELECT_SHOWN_COLUMNS=Angezeigte Spalten
+ADMIN_LIST_BRANCH_OFFICES_HEADER=Alle Filialen auflisten
+LABEL_USERS=Benutzer
+FILTER_BY_MULTIPLE_USER_TITLE=Liste durch Auswahl von ein oder mehr Benutzern durchsuchen.
+LABEL_COMPANIES=Firmen
+FILTER_BY_MULTIPLE_COMPANIES_TITLE=Liste durch Auswahl von ein oder mehr Unternehmen durchsuchen.
+LABEL_COMPANY_EMPLOYEES=Mitarbeiter
+FILTER_BY_MULTIPLE_COMPANY_EMPLOYEES_TITLE=Liste durch Auswahl von ein oder mehr Mitarbeiter durchsuchen.
index 35600bc58b9a1d3cbe5001b2fade1462401cfb28..7e54d2a5e877a9d8a2e807bc74e41693fdd22445 100644 (file)
@@ -500,8 +500,7 @@ BUTTON_ADMIN_EXPORT_CONTACTS_XLS=Export all data as Excel file
 LINK_ADMIN_EXPORT_CONTACT=Export data
 LINK_ADMIN_EXPORT_CONTACT_TITLE=Export contact data
 PERSONAL_DATA_BIRTHDAY=Birthday (mm-dd-yyyy):
-BIRTHDAY_PATTERN=MM-dd-yyyy
-INVALID_BIRTHDAY=Wrong birthday entered.
+DATE_PATTERN=MM-dd-yyyy
 ADMIN_EXPORT_CONTACT_ID=Contact data id
 ADMIN_EXPORT_CONTACT_PERSONAL_TITLE=Gender
 ADMIN_EXPORT_CONTACT_ACADEMIC_TITLE=Title
@@ -798,7 +797,7 @@ ADMIN_BASIC_COMPANY_DATA_LIST_EMPTY=There are currently no basic company data in
 TABLE_SUMMARY_ADMIN_LIST_BASIC_COMPANY_DATA=This table lists basic company data.
 ADMIN_BASIC_COMPANY_DATA_ID=Id Number:
 ADMIN_LINK_SHOW_BASIC_COMAPNY_DATA_TITLE=Show details of this business contact.
-ADMIN_ASSIGNED_USER_ID=Assigned user:
+ADMIN_ASSIGNED_USER=Assigned user:
 ADMIN_LINK_SHOW_BASIC_COMPANY_DATA_OWNER_USER_TITLE=Shows assigned user profile.
 ADMIN_LINK_ASSIGN=Assign
 ADMIN_LINK_ASSIGN_BASIC_COMPANY_DATA_OWNER_USER_TITLE=Assigns this business contact to a user account.
@@ -909,7 +908,15 @@ ADMIN_LANDLINE_NUMBER_LIST_EMPTY=There are no land-line numbers in database. Or
 ADMIN_MOBILE_NUMBER_LIST_EMPTY=There are no mobile numbers in database. Or your search criteria doesn't match anything.
 ADMIN_CONTACT_MOBILE_LIST_EMPTY=There are no mobile numbers of contacts in database. Or your search criteria doesn't match anything.
 ADMIN_MOBILE_PROVIDER_COUNTRY_REQUIRED=Please select a country for mobile provider.
-COUNTRIES=Countries
+LABEL_COUNTRIES=Countries
+#Filter list by selecting one or more users.
 FILTER_BY_MULTIPLE_COUNTRY_TITLE=Filter list by selecting one or more countries.
 ADMIN_LIST_MOBILE_PROVIDERS_HEADER=List of all mobile providers
 SELECT_SHOWN_COLUMNS=Shown columns
+ADMIN_LIST_BRANCH_OFFICES_HEADER=List all branch offices
+LABEL_USERS=Users
+FILTER_BY_MULTIPLE_USER_TITLE=Filter list by selecting one or more users.
+LABEL_COMPANIES=Companies
+FILTER_BY_MULTIPLE_COMPANIES_TITLE=Filter list by selecting one or more companies.
+LABEL_COMPANY_EMPLOYEES=Employees
+FILTER_BY_MULTIPLE_COMPANY_EMPLOYEES_TITLE=Filter list by selecting one or more employees.
index 91ff24dee8d954af6905cd010c00e3d17956813a..91554a84bba05029356a249b7aee605c6a36bc2c 100644 (file)
                                </div>
 
                                <div class="table-right-medium">
-                                       <widgets:outputCountrySelector id="country" value="#{adminContactController.contactCountry}"
+                                       <widgets:outputCountrySelector id="country" value="#{adminContactController.contactCountry}" />
                                </div>
                        </h:panelGroup>
 
                                </div>
 
                                <div class="table-right-medium">
-                                       <p:inputText styleClass="input" id="contactBirthday" value="#{adminContactController.birthday}" size="10" converterMessage="#{msg.INVALID_BIRTHDAY}">
-                                               <f:convertDateTime pattern="#{msg.BIRTHDAY_PATTERN}" />
-                                       </p:inputText>
+                                       <p:calendar id="contactBirthday" value="#{contactController.birthday}" />
                                </div>
                        </h:panelGroup>
 
index 25ddc379e823752a202bced617e29b28f746ba3f..6589d2cb50ad70fc7b0d3228250aab579fd04c45 100644 (file)
                                </div>
 
                                <div class="table-right-medium">
-                                       <p:selectOneMenu id="mobileProvider" value="#{adminPhoneController.mobileProvider}" required="true" requiredMessage="#{msg.ADMIN_MOBILE_PROVIDER_REQUIRED}">
+                                       <p:selectOneMenu
+                                               id="mobileProvider"
+                                               value="#{adminPhoneController.mobileProvider}"
+                                               filter="true"
+                                               filterMatchMode="contains"
+                                               required="true"
+                                               requiredMessage="#{msg.ADMIN_MOBILE_PROVIDER_REQUIRED}"
+                                               >
                                                <f:converter converterId="MobileProviderConverter" />
                                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                <f:selectItems value="#{mobileProviderController.allMobileProviders()}" var="mobileProvider" itemValue="#{mobileProvider}" itemLabel="#{mobileProvider.providerCountry.countryExternalDialPrefix}#{mobileProvider.providerDialPrefix} (#{mobileProvider.providerName})" />
index aa2227aa4d20513d662bdb279103f8e7bf49d3b8..720312274eb738b5d8a451d21e98f02c41b4950e 100644 (file)
@@ -6,7 +6,16 @@
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
        xmlns:p="http://primefaces.org/ui">
 
-       <p:selectOneMenu id="#{id}" value="#{value}" styleClass="#{empty styleClass ? 'select' : styleClass}" rendered="#{empty rendered or rendered}" required="#{empty required ? false : required}" requiredMessage="#{requiredMessage}">
+       <p:selectOneMenu
+               id="#{id}"
+               value="#{value}"
+               styleClass="#{empty styleClass ? 'select' : styleClass}"
+               filter="true"
+               filterMatchMode="contains"
+               rendered="#{empty rendered or rendered}"
+               required="#{empty required ? false : required}"
+               requiredMessage="#{requiredMessage}"
+               >
                <f:converter converterId="CountryConverter" />
                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" rendered="#{empty allowNull or allowNull}" />
                <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{country.countryCode} (#{msg[country.countryI18nKey]})" />
index a9445346cb4ed0c83cdaafd74287a838dd85e9fb..f289866d04210790e8558de928528d00d221ce5e 100644 (file)
                        </div>
 
                        <div class="table-right-medium">
-                               <p:selectOneMenu id="mobileProvider" value="#{targetController.mobileProvider}">
+                               <p:selectOneMenu
+                                       id="mobileProvider"
+                                       value="#{targetController.mobileProvider}"
+                                       filter="true"
+                                       filterMatchMode="contains"
+                                       >
                                        <f:converter converterId="MobileProviderConverter" />
                                        <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                        <f:selectItems value="#{mobileProviderController.allMobileProviders()}" var="mobileProvider" itemValue="#{mobileProvider}" itemLabel="#{mobileProvider.providerCountry.countryExternalDialPrefix}#{mobileProvider.providerDialPrefix} (#{mobileProvider.providerName})" />
index 9bb9ea5bdf12143864a8f409ffaa4fe8031c39ee..1e0bbf59568f789c1bbb9191747b5a2266c0254b 100644 (file)
                        </div>
 
                        <div class="table-right-medium">
-                               <p:selectOneMenu id="userPersonalTitle" value="#{targetController.personalTitle}" required="#{(empty allowEmptyRequiredData or not allowEmptyRequiredData) and featureController.isFeatureEnabled(targetController.controllerType.concat('_personal_title'))}" requiredMessage="#{msg.FIELD_PERSONAL_TITLE_REQUIRED}">
+                               <p:selectOneMenu
+                                       id="userPersonalTitle"
+                                       value="#{targetController.personalTitle}"
+                                       filter="true"
+                                       filterMatchMode="contains"
+                                       required="#{(empty allowEmptyRequiredData or not allowEmptyRequiredData) and featureController.isFeatureEnabled(targetController.controllerType.concat('_personal_title'))}"
+                                       requiredMessage="#{msg.FIELD_PERSONAL_TITLE_REQUIRED}">
                                        <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" noSelectionOption="true" />
                                        <f:selectItems value="#{genderController.selectableGenders}" var="personalTitle" itemValue="#{personalTitle}" itemLabel="#{msg[personalTitle.messageKey]}" />
                                </p:selectOneMenu>
index 56a3987b2a352872da8cc2e4d08a1616012e0fa1..d4872e66e37796a6a74bcc8dfdf4f30cb107f334 100644 (file)
                        </div>
 
                        <div class="table-right-medium">
-                               <p:selectOneMenu id="profileMode" value="#{targetController.userProfileMode}">
+                               <p:selectOneMenu
+                                       id="profileMode"
+                                       value="#{targetController.userProfileMode}"
+                                       filter="true"
+                                       filterMatchMode="contains"
+                                       >
                                        <f:selectItems value="#{profileModeController.allProfileModes()}" var="mode" itemValue="#{mode}" itemLabel="#{msg[mode.messageKey]}" />
                                </p:selectOneMenu>
                        </div>
index 42911da2363340895f6cb1119e95631b75994dca..2c486d5fc1398201b3273c3c708ea99428d82885 100644 (file)
                                </div>
 
                                <div class="table-right-medium">
-                                       <p:selectOneMenu id="companyUserOwner" value="#{adminCompanyDataController.companyUserOwner}">
+                                       <p:selectOneMenu
+                                               id="companyUserOwner"
+                                               value="#{adminCompanyDataController.companyUserOwner}"
+                                               filter="true"
+                                               filterMatchMode="contains"
+                                               >
                                                <f:converter converterId="UserConverter" />
                                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                <f:selectItems value="#{userController.allUsers()}" var="companyUserOwner" itemValue="#{companyUserOwner}" itemLabel="#{companyUserOwner.userContact.contactFirstName} #{companyUserOwner.userContact.contactFamilyName} (#{companyUserOwner.userName})" />
                                </div>
 
                                <div class="table-right-medium">
-                                       <p:selectOneMenu id="companyContactEmployee" value="#{adminCompanyDataController.companyContactEmployee}">
+                                       <p:selectOneMenu
+                                               id="companyContactEmployee"
+                                               value="#{adminCompanyDataController.companyContactEmployee}"
+                                               filter="true"
+                                               filterMatchMode="contains"
+                                               >
                                                <f:converter converterId="CompanyEmployeeConverter" />
                                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="companyHeadQuarters" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo}" />
                                </div>
 
                                <div class="table-right-medium">
-                                       <p:selectOneMenu id="companyFounder" value="#{adminCompanyDataController.companyFounder}">
+                                       <p:selectOneMenu
+                                               id="companyFounder"
+                                               value="#{adminCompanyDataController.companyFounder}"
+                                               filter="true"
+                                               filterMatchMode="contains"
+                                               >
                                                <f:converter converterId="CompanyEmployeeConverter" />
                                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="companyHeadQuarters" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo}" />
                                </div>
 
                                <div class="table-right-medium">
-                                       <p:selectOneMenu id="companyHeadQuarters" value="#{adminCompanyDataController.companyHeadQuarters}">
+                                       <p:selectOneMenu
+                                               id="companyHeadQuarters"
+                                               value="#{adminCompanyDataController.companyHeadQuarters}"
+                                               filter="true"
+                                               filterMatchMode="contains"
+                                               >
                                                <f:converter converterId="CompanyHeadquartersConverter" />
                                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                <f:selectItems value="#{companyHeadquartersController.allCompanyHeadquarters()}" var="companyHeadQuarters" itemValue="#{companyHeadQuarters}" itemLabel="#{companyHeadQuarters.foo}" />
                                </div>
 
                                <div class="table-right-medium">
-                                       <p:inputTextarea styleClass="input" id="companyComments" rows="7" cols="25" value="#{adminCompanyDataController.companyComments}" />
+                                       <p:inputTextarea
+                                               styleClass="input"
+                                               id="companyComments"
+                                               rows="7"
+                                               cols="25"
+                                               value="#{adminCompanyDataController.companyComments}"
+                                               />
                                </div>
                        </h:panelGroup>
                </fieldset>
index f0d990dde295c73f39cd63c81866c7f95bab2357..48f7352ec04ecdb347cb4b8de49c6033ddd9ac4b 100644 (file)
                                </div>
 
                                <div class="table-right-medium">
-                                       <p:selectOneMenu id="branchCompany" value="#{adminBranchOfficeController.branchCompany}" required="true" requiredMessage="#{msg.ADMIN_BRANCH_OFFICE_COMPANY_REQUIRED}">
+                                       <p:selectOneMenu
+                                               id="branchCompany"
+                                               value="#{adminBranchOfficeController.branchCompany}"
+                                               filter="true"
+                                               filterMatchMode="contains"
+                                               required="true"
+                                               requiredMessage="#{msg.ADMIN_BRANCH_OFFICE_COMPANY_REQUIRED}"
+                                               >
                                                <f:converter converterId="BasicCompanyDataConverter" />
                                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" noSelectionOption="true" itemDisabled="true" />
                                                <f:selectItems value="#{basicDataController.allCompanyBasicData()}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
                                </div>
 
                                <div class="table-right-medium">
-                                       <p:selectOneMenu id="branchContactEmployee" value="#{adminBranchOfficeController.branchContactEmployee}">
+                                       <p:selectOneMenu
+                                               id="branchContactEmployee"
+                                               value="#{adminBranchOfficeController.branchContactEmployee}"
+                                               filter="true"
+                                               filterMatchMode="contains"
+                                               >
                                                <f:converter converterId="CompanyEmployeeConverter" />
                                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="companyHeadQuarters" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo}" />
                                </div>
 
                                <div class="table-right-medium">
-                                       <p:selectOneMenu id="branchUserOwner" value="#{adminBranchOfficeController.branchUserOwner}">
+                                       <p:selectOneMenu
+                                               id="branchUserOwner"
+                                               value="#{adminBranchOfficeController.branchUserOwner}"
+                                               filter="true"
+                                               filterMatchMode="contains"
+                                               >
                                                <f:converter converterId="UserConverter" />
                                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                <f:selectItems value="#{userController.allUsers()}" var="branchUserOwner" itemValue="#{branchUserOwner}" itemLabel="#{branchUserOwner.userContact.contactFirstName} #{branchUserOwner.userContact.contactFamilyName} (#{branchUserOwner.userName})" />
index 83ab95de02fda9842907259aab2685433b19b73a..c5342ccadb264016c3c7b85ef9aa4225975a370b 100644 (file)
@@ -22,6 +22,7 @@
                        </f:facet>
 
                        <f:loadBundle var="msg" basename="org.mxchange.localization.bundle" />
+                       <f:loadBundle var="project" basename="org.mxchange.localization.project" />
 
                        <h:outputStylesheet name="/css/default.css" />
                        <h:outputStylesheet name="/css/layout.css" />
index 0619039dff25897dc7ff36f9a3f04e6464be20e8..b945d350791d0e38c0a4e17960c00eb85574cf25 100644 (file)
                                </div>
 
                                <div class="table-right-medium">
-                                       <p:inputText styleClass="input" id="birthday" value="#{contactController.birthday}" required="true" size="10" requiredMessage="#{msg.GUEST_CONTACT_DATA_BIRTHDAY_REQUIRED}" converterMessage="#{msg.INVALID_BIRTHDAY}">
-                                               <f:convertDateTime pattern="#{msg.BIRTHDAY_PATTERN}" />
-                                       </p:inputText>
+                                       <p:calendar id="birthday" value="#{contactController.birthday}" required="true" requiredMessage="#{msg.GUEST_CONTACT_DATA_BIRTHDAY_REQUIRED}" />
                                </div>
                        </h:panelGroup>
 
index 4c703de993a2a98c52d96f6bbedd287211dbc987..82ea659d41ff698b11d8af64594e80122fa432a3 100644 (file)
@@ -30,7 +30,7 @@
 
                        <p:column>
                                <f:facet name="header">
-                                       <h:outputText value="#{msg.ADMIN_ASSIGNED_USER_ID}" />
+                                       <h:outputText value="#{msg.ADMIN_ASSIGNED_USER}" />
                                </f:facet>
 
                                <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_BASIC_COMPANY_DATA_OWNER_USER_TITLE}" value="#{basicData.companyUserOwner.userId}" rendered="#{not empty basicData.companyUserOwner}">
index d28485350b1acd20ff6651823e7fdd54cb64558b..83d55047e33fad9dd986e18defed7c65cd235c49 100644 (file)
        </ui:define>
 
        <ui:define name="content">
-               <p:dataTable id="table_list_branch_offices" var="branchOffice" value="#{branchOfficeController.allBranchOffices()}" tableStyleClass="table table-full" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICES}" emptyMessage="#{msg.ADMIN_BRANCH_OFFICES_LIST_EMPTY}">
-                       <p:column>
-                               <f:facet name="header">
-                                       <h:outputText value="#{msg.ADMIN_ID_NUMBER}" />
-                               </f:facet>
-
-                               <p:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{branchOffice.branchId}">
-                                       <f:param name="branchId" value="#{branchOffice.branchId}" />
-                               </p:link>
-                       </p:column>
-
-                       <p:column>
-                               <f:facet name="header">
-                                       <h:outputText value="#{msg.ADMIN_ASSIGNED_USER_ID}" />
-                               </f:facet>
-
-                               <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICES_OWNER_USER_TITLE}" value="#{branchOffice.branchUserOwner.userId}" rendered="#{not empty branchOffice.branchUserOwner}">
-                                       <f:param name="userId" value="#{branchOffice.branchUserOwner.userId}" />
-                               </p:link>
-
-                               <p:link outcome="admin_assign_branch_office_owner" title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_OWNER_USER_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty branchOffice.branchUserOwner}">
-                                       <f:param name="branchId" value="#{branchOffice.branchId}" />
-                               </p:link>
-                       </p:column>
-
-                       <p:column>
-                               <f:facet name="header">
-                                       <h:outputText value="#{msg.ADMIN_BASIC_COMPANY_DATA_COMPANY_NAME}" />
-                               </f:facet>
-
-                               <h:outputLink value="#{branchOffice.branchCompany.companyWebsiteUrl}" target="_blank" title="#{msg.LINK_COMPANY_WEBSITE_URL_TITLE}" rel="external" rendered="#{not empty branchOffice.branchCompany.companyWebsiteUrl}">
-                                       <h:outputText value="#{branchOffice.branchCompany.companyName}" />
-                               </h:outputLink>
-
-                               <h:outputText value="#{branchOffice.branchCompany.companyName}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty branchOffice.branchCompany.companyWebsiteUrl}" />
-                       </p:column>
-
-                       <p:column>
-                               <f:facet name="header">
-                                       <h:outputText value="#{msg.DATA_EMAIL_ADDRESS}" />
-                               </f:facet>
+               <h:form id="form-list-branch-offices">
+                       <p:dataTable
+                               id="table-list-branch-offices"
+                               var="branchOffice"
+                               value="#{branchOfficeController.allBranchOffices()}"
+                               tableStyleClass="table table-full"
+                               paginator="true"
+                               paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
+                               widgetVar="branchOfficeTable"
+                               filteredValue="#{branchOfficeController.filteredBranchOffices}"
+                               rows="10"
+                               reflow="true"
+                               resizableColumns="true"
+                               rowsPerPageTemplate="5,10,20,50,100"
+                               sortMode="multiple"
+                               summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICES}"
+                               emptyMessage="#{msg.ADMIN_BRANCH_OFFICES_LIST_EMPTY}"
+                               >
 
-                               <h:outputLink value="mailto:#{branchOffice.branchEmailAddress}" rendered="#{not empty branchOffice.branchEmailAddress}" />
-
-                               <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty branchOffice.branchEmailAddress}" />
-                       </p:column>
-
-                       <p:column>
-                               <f:facet name="header">
-                                       <h:outputText value="#{msg.DATA_ADDRESS}" />
-                               </f:facet>
-
-                               <h:outputText value="#{branchOffice.branchZipCode} #{branchOffice.branchCity}" title="#{branchOffice.branchStreet} #{branchOffice.branchHouseNumber} (#{msg.DATA_STORE} #{branchOffice.branchStore}, #{msg.DATA_SUITE_NUMBER} #{branchOffice.branchSuiteNumber})" />
-                       </p:column>
-
-                       <p:column>
-                               <f:facet name="header">
-                                       <h:outputText value="#{msg.ADMIN_CONTACT_PERSON}" />
-                               </f:facet>
-
-                               <p:link outcome="admin_show_business_employee" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICES_CONTACT_PERSON_TITLE}" value="#{branchOffice.branchContactEmployee.employeeId}" rendered="#{not empty branchOffice.branchContactEmployee}">
-                                       <f:param name="employeeId" value="#{branchOffice.branchContactEmployee.employeeId}" />
-                               </p:link>
-
-                               <p:link outcome="admin_assign_branch_office_employee" title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_CONTACT_PERSON_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty branchOffice.branchContactEmployee}">
-                                       <f:param name="branchId" value="#{branchOffice.branchId}" />
-                               </p:link>
-                       </p:column>
-
-                       <p:column>
-                               <f:facet name="header">
-                                       <h:outputText value="#{msg.ADMIN_LIST_ENTRY_CREATED}" />
-                               </f:facet>
-
-                               <h:outputText id="branchCreated" value="#{branchOffice.branchCreated.time}">
-                                       <f:convertDateTime for="branchCreated" type="both" timeStyle="short" dateStyle="short" />
-                               </h:outputText>
-                       </p:column>
-
-                       <p:column>
                                <f:facet name="header">
-                                       <h:outputText value="#{msg.ADMIN_ACTION_LINKS}" />
+                                       <h:outputText value="#{msg.ADMIN_LIST_BRANCH_OFFICES_HEADER}" />
+                                       <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
+                                       <p:columnToggler datasource="table-list-branch-offices" trigger="toggler" />
                                </f:facet>
 
-                               <links:outputBranchOfficeAdminMiniLinks branchOffice="#{branchOffice}" />
-                       </p:column>
-               </p:dataTable>
+                               <p:column headerText="#{msg.ADMIN_ID_NUMBER}" sortBy="#{branchOffice.branchId}" filterBy="#{branchOffice.branchId}">
+                                       <p:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{branchOffice.branchId}">
+                                               <f:param name="branchId" value="#{branchOffice.branchId}" />
+                                       </p:link>
+                               </p:column>
+
+                               <p:column headerText="#{msg.ADMIN_ASSIGNED_USER}" sortBy="#{branchOffice.branchUserOwner.userName}" filterBy="#{branchOffice.branchUserOwner}" filterMatchMode="in">
+                                       <f:facet name="filter">
+                                               <p:selectCheckboxMenu filter="true" filterMatchMode="contains" label="#{msg.LABEL_USERS}" onchange="PF('branchOfficeTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_USER_TITLE}">
+                                                       <f:converter converterId="UserConverter" />
+                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+                                                       <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
+                                               </p:selectCheckboxMenu>
+                                       </f:facet>
+
+                                       <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICES_OWNER_USER_TITLE}" value="#{branchOffice.branchUserOwner.userId}" rendered="#{not empty branchOffice.branchUserOwner}">
+                                               <f:param name="userId" value="#{branchOffice.branchUserOwner.userId}" />
+                                       </p:link>
+
+                                       <p:link outcome="admin_assign_branch_office_owner" title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_OWNER_USER_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty branchOffice.branchUserOwner}">
+                                               <f:param name="branchId" value="#{branchOffice.branchId}" />
+                                       </p:link>
+                               </p:column>
+
+                               <p:column headerText="#{msg.ADMIN_BASIC_COMPANY_DATA_COMPANY_NAME}" sortBy="#{branchOffice.branchCompany.companyName}" filterBy="#{branchOffice.branchCompany}" filterMatchMode="in">
+                                       <f:facet name="filter">
+                                               <p:selectCheckboxMenu filter="true" filterMatchMode="contains" label="#{msg.LABEL_COMPANIES}" onchange="PF('branchOfficeTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}">
+                                                       <f:converter converterId="BasicCompanyDataConverter" />
+                                                       <f:selectItems value="#{basicDataController.allCompanyBasicData()}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
+                                               </p:selectCheckboxMenu>
+                                       </f:facet>
+
+                                       <h:outputLink value="#{branchOffice.branchCompany.companyWebsiteUrl}" target="_blank" title="#{msg.LINK_COMPANY_WEBSITE_URL_TITLE}" rel="external" rendered="#{not empty branchOffice.branchCompany.companyWebsiteUrl}">
+                                               <h:outputText value="#{branchOffice.branchCompany.companyName}" />
+                                       </h:outputLink>
+
+                                       <h:outputText value="#{branchOffice.branchCompany.companyName}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty branchOffice.branchCompany.companyWebsiteUrl}" />
+                               </p:column>
+
+                               <p:column headerText="#{msg.DATA_EMAIL_ADDRESS}" sortBy="#{branchOffice.branchEmailAddress}" filterBy="#{branchOffice.branchEmailAddress}" filterMatchMode="contains">
+                                       <h:outputLink value="mailto:#{branchOffice.branchEmailAddress}" rendered="#{not empty branchOffice.branchEmailAddress}" />
+
+                                       <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty branchOffice.branchEmailAddress}" />
+                               </p:column>
+
+                               <p:column headerText="#{msg.DATA_ADDRESS}" sortBy="#{branchOffice.branchCity}" filterBy="#{branchOffice.branchCity}" filterMatchMode="contains">
+                                       <h:outputText value="#{branchOffice.branchZipCode} #{branchOffice.branchCity}" title="#{branchOffice.branchStreet} #{branchOffice.branchHouseNumber} (#{msg.DATA_STORE} #{branchOffice.branchStore}, #{msg.DATA_SUITE_NUMBER} #{branchOffice.branchSuiteNumber})" />
+                               </p:column>
+
+                               <p:column headerText="#{msg.ADMIN_CONTACT_PERSON}" sortBy="#{branchOffice.branchContactEmployee.employeePersonalData.contactFamilyName}" filterBy="#{branchOffice.branchContactEmployee}" filterMatchMode="in">
+                                       <f:facet name="filter">
+                                               <p:selectCheckboxMenu filter="true" filterMatchMode="contains" label="#{msg.LABEL_COMPANY_EMPLOYEES}" onchange="PF('branchOfficeTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_COMPANY_EMPLOYEES_TITLE}">
+                                                       <f:converter converterId="CompanyEmployeeConverter" />
+                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+                                                       <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{employee.employeePersonalData.contactFirstName} #{employee.employeePersonalData.contactFamilyName}" />
+                                               </p:selectCheckboxMenu>
+                                       </f:facet>
+
+                                       <p:link outcome="admin_show_business_employee" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICES_CONTACT_PERSON_TITLE}" value="#{branchOffice.branchContactEmployee.employeeId}" rendered="#{not empty branchOffice.branchContactEmployee}">
+                                               <f:param name="employeeId" value="#{branchOffice.branchContactEmployee.employeeId}" />
+                                       </p:link>
+
+                                       <p:link outcome="admin_assign_branch_office_employee" title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_CONTACT_PERSON_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty branchOffice.branchContactEmployee}">
+                                               <f:param name="branchId" value="#{branchOffice.branchId}" />
+                                       </p:link>
+                               </p:column>
+
+                               <p:column headerText="#{msg.ADMIN_LIST_ENTRY_CREATED}" sortBy="#{branchOffice.branchCreated}">
+                                       <h:outputText id="branchCreated" value="#{branchOffice.branchCreated.time}">
+                                               <f:convertDateTime for="branchCreated" type="both" timeStyle="short" dateStyle="short" />
+                                       </h:outputText>
+                               </p:column>
+
+                               <p:column headerText="#{msg.ADMIN_ACTION_LINKS}" sortable="false">
+                                       <links:outputBranchOfficeAdminMiniLinks branchOffice="#{branchOffice}" />
+                               </p:column>
+                       </p:dataTable>
+               </h:form>
 
                <h:form id="form_admin_add_branch_office">
                        <h:panelGroup styleClass="table table-medium" layout="block">
index a45e6972ea350fecc6efb854a69220e8136fbfb6..fc4a0a063cba2a296c84ad6bca59bf014e1fad86 100644 (file)
                                id="table-list-mobile-provider"
                                var="mobileProvider"
                                value="#{mobileProviderController.allMobileProviders()}"
-                               widgetVar="mobileProviderTable"
-                               filteredValue="#{mobileProviderController.filteredMobileProviders}"
                                tableStyleClass="table table-medium"
-                               rows="10"
                                paginator="true"
                                paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
+                               widgetVar="mobileProviderTable"
+                               filteredValue="#{mobileProviderController.filteredMobileProviders}"
+                               rows="10"
                                reflow="true"
                                resizableColumns="true"
                                rowsPerPageTemplate="5,10,20,50,100"
                                sortMode="multiple"
                                summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILE_PROVIDERS}"
-                               emptyMessage="#{msg.ADMIN_MOBILE_PROVIDER_LIST_EMPTY}">
+                               emptyMessage="#{msg.ADMIN_MOBILE_PROVIDER_LIST_EMPTY}"
+                               >
 
                                <f:facet name="header">
                                        <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDERS_HEADER}" />
                                        <p:columnToggler datasource="table-list-mobile-provider" trigger="toggler" />
                                </f:facet>
 
-                               <p:column filterBy="#{mobileProvider.providerId}" sortBy="#{mobileProvider.providerId}" headerText="#{msg.ADMIN_ID_NUMBER}">
+                               <p:column headerText="#{msg.ADMIN_ID_NUMBER}" sortBy="#{mobileProvider.providerId}" filterBy="#{mobileProvider.providerId}">
                                        <p:link outcome="admin_show_mobile_provider" title="#{msg.ADMIN_LINK_SHOW_MOBILE_PROVIDER_TITLE}" value="#{mobileProvider.providerId}">
                                                <f:param name="providerId" value="#{mobileProvider.providerId}" />
                                        </p:link>
                                </p:column>
 
-                               <p:column filterBy="#{mobileProvider.providerName}" sortBy="#{mobileProvider.providerName}" headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_NAME}" filterMatchMode="contains">
+                               <p:column headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_NAME}" sortBy="#{mobileProvider.providerName}" filterBy="#{mobileProvider.providerName}" filterMatchMode="contains">
                                        <h:outputText value="#{mobileProvider.providerName}" />
                                </p:column>
 
-                               <p:column filterBy="#{mobileProvider.providerDialPrefix}" sortBy="#{mobileProvider.providerDialPrefix}" headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX}" filterMatchMode="contains">
+                               <p:column headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX}" sortBy="#{mobileProvider.providerDialPrefix}" filterBy="#{mobileProvider.providerDialPrefix}" filterMatchMode="contains">
                                        <h:outputText value="#{mobileProvider.providerDialPrefix}" />
                                </p:column>
 
-                               <p:column filterBy="#{mobileProvider.providerCountry}" sortBy="#{mobileProvider.providerCountry.countryPhoneCode}" headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_COUNTRY}" filterMatchMode="in">
+                               <p:column headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_COUNTRY}" sortBy="#{mobileProvider.providerCountry.countryPhoneCode}" filterBy="#{mobileProvider.providerCountry}" filterMatchMode="in">
                                        <f:facet name="filter">
-                                               <p:selectCheckboxMenu filter="true" label="#{msg.COUNTRIES}" onchange="PF('mobileProviderTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_COUNTRY_TITLE}">
+                                               <p:selectCheckboxMenu filter="true" filterMatchMode="contains" label="#{msg.LABEL_COUNTRIES}" onchange="PF('mobileProviderTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_COUNTRY_TITLE}">
                                                        <f:converter converterId="CountryConverter" />
                                                        <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{msg[country.countryI18nKey]}" />
                                                </p:selectCheckboxMenu>
                                        <h:outputText value="#{msg[mobileProvider.providerCountry.countryI18nKey]}" />
                                </p:column>
 
-                               <p:column sortBy="#{mobileProvider.providerEntryCreated}" headerText="#{msg.ADMIN_LIST_ENTRY_CREATED}">
+                               <p:column headerText="#{msg.ADMIN_LIST_ENTRY_CREATED}" sortBy="#{mobileProvider.providerEntryCreated}">
                                        <h:outputText id="providerEntryCreated" value="#{mobileProvider.providerEntryCreated.time}">
                                                <f:convertDateTime for="providerEntryCreated" type="both" timeStyle="short" dateStyle="short" />
                                        </h:outputText>
                                </p:column>
 
-                               <p:column sortable="false" headerText="#{msg.ADMIN_ACTION_LINKS}">
+                               <p:column headerText="#{msg.ADMIN_ACTION_LINKS}" sortable="false">
                                        <links:outputMobileProviderAdminMiniLinks mobileProvider="#{mobileProvider}" />
                                </p:column>
                        </p:dataTable>
index 9ebed061c278c6ce2272613fb20a528c9f8dd998..a47b8986e5e3f1a585a2e61e69e665ccd9d5acf6 100644 (file)
                                                        </div>
 
                                                        <div class="table-right-medium">
-                                                               <p:selectOneMenu id="userContact" value="#{adminUserController.contact}" converter="ContactConverter">
+                                                               <p:selectOneMenu
+                                                                       id="userContact"
+                                                                       value="#{adminUserController.contact}"
+                                                                       filter="true"
+                                                                       filterMatchMode="contains"
+                                                                       >
                                                                        <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                                        <f:selectItems value="#{contactController.selectableContacts()}" var="contact" itemValue="#{contact}" itemLabel="#{contact.contactId}: #{msg[contact.contactPersonalTitle.messageKey]} #{contact.contactFirstName} #{contact.contactFamilyName}" />
                                                                </p:selectOneMenu>