final Boolean isRegistered = BASIC_DATA_LIST_CONTROLLER.isEmailAddressRegistered(emailAddress);
// Is the email address already registered?
- if ((!clientId.endsWith("companyEmailAddress")) && (isRegistered)) { //NOI18N
+ if ((clientId.endsWith("companyEmailAddress")) && isRegistered) { //NOI18N
// Generate message
final String message = MessageFormat.format("Email address {0} is already registered.", emailAddress); //NOI18N
- // No, then abort here
- throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message));
- } else if ((clientId.endsWith("companyEmailAddress")) && (!isRegistered)) { //NOI18N
- // Generate message
- final String message = MessageFormat.format("Email address {0} is not registered.", emailAddress); //NOI18N
-
// No, then abort here
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message));
}
final Boolean isRegistered = BRANCH_OFFICE_LIST_CONTROLLER.isEmailAddressRegistered(emailAddress);
// Is the email address already registered?
- if ((!clientId.endsWith("branchEmailAddress")) && (isRegistered)) { //NOI18N
+ if ((clientId.endsWith("branchEmailAddress")) && isRegistered) { //NOI18N
// Generate message
final String message = MessageFormat.format("Email address {0} is already registered.", emailAddress); //NOI18N
- // No, then abort here
- throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message));
- } else if ((clientId.endsWith("branchEmailAddress")) && (!isRegistered)) { //NOI18N
- // Generate message
- final String message = MessageFormat.format("Email address {0} is not registered.", emailAddress); //NOI18N
-
// No, then abort here
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message));
}
final Boolean isRegistered = EMPLOYEE_LIST_CONTROLLER.isEmailAddressRegistered(emailAddress);
// Is the email address already registered?
- if ((!clientId.endsWith("employeeEmailAddress")) && (isRegistered)) { //NOI18N
+ if ((clientId.endsWith("employeeEmailAddress")) && isRegistered) { //NOI18N
// Generate message
final String message = MessageFormat.format("Email address {0} is already registered.", emailAddress); //NOI18N
- // No, then abort here
- throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message));
- } else if ((clientId.endsWith("employeeEmailAddress")) && (!isRegistered)) { //NOI18N
- // Generate message
- final String message = MessageFormat.format("Email address {0} is not registered.", emailAddress); //NOI18N
-
// No, then abort here
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message));
}
final Boolean isRegistered = HEADQUARTER_LIST_CONTROLLER.isEmailAddressRegistered(emailAddress);
// Is the email address already registered?
- if ((!clientId.endsWith("headquarterEmailAddress")) && (isRegistered)) { //NOI18N
+ if ((clientId.endsWith("headquarterEmailAddress")) && isRegistered) { //NOI18N
// Generate message
final String message = MessageFormat.format("Email address {0} is already registered.", emailAddress); //NOI18N
- // No, then abort here
- throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message));
- } else if ((clientId.endsWith("headquarterEmailAddress")) && (!isRegistered)) { //NOI18N
- // Generate message
- final String message = MessageFormat.format("Email address {0} is not registered.", emailAddress); //NOI18N
-
// No, then abort here
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message));
}
COUNTRY_FRANCE=Frankreich
COUNTRY_GERMANY=Deutschland
COUNTRY_GREECE=Griechenland
+COUNTRY_HUNGARY=Ungarn
COUNTRY_ITALIA=Italien
COUNTRY_NETHERLANDS=Niederlande
COUNTRY_PHILIPPINES=Philippinen
COUNTRY_FRANCE=France
COUNTRY_GERMANY=Germany
COUNTRY_GREECE=Greece
+COUNTRY_HUNGARY=Hungary
COUNTRY_ITALIA=Italia
COUNTRY_NETHERLANDS=Netherlands
COUNTRY_PHILIPPINES=Philippines
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-@TODO: title="#{msg.ADMIN_HEADQUARTER_LEGEND_TITLE}"
--->
-<ui:composition
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:core="http://mxchange.org/jsf/core/widgets"
- xmlns:validator="http://mxchange.org/jsf/core/validators"
- xmlns:f="http://xmlns.jcp.org/jsf/core"
- xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
- xmlns:p="http://primefaces.org/ui"
- >
-
- <p:fieldset legend="#{msg.ADMIN_HEADQUARTER_LEGEND}">
- <p:panelGrid
- layout="grid"
- columns="2"
- columnClasses="ui-grid-col-4,ui-grid-col-8"
- styleClass="ui-noborder"
- >
- <p:outputLabel for="headquarterCompanyName" value="#{msg.ADMIN_HEADQUARTER_COMPANY_NAME}" />
- <p:inputText
- id="headquarterCompanyName"
- value="#{adminHeadquarterActionController.headquarterCompanyName}"
- size="30"
- maxlength="200"
- required="true"
- requiredMessage="#{msg.ADMIN_HEADQUARTER_COMPANY_NAME_REQUIRED}"
- >
- <f:validator validatorId="HeadquarterCompanyNameValidator" />
- <f:attribute name="checkExisting" value="false" />
- </p:inputText>
-
- <p:outputLabel for="headquarterContactEmployee" value="#{msg.ADMIN_ASSIGN_HEADQUARTER_CONTACT_EMPLOYEE}" />
- <p:selectOneMenu
- id="headquarterContactEmployee"
- value="#{adminHeadquarterActionController.headquarterContactEmployee}"
- filter="true"
- filterMatchMode="contains"
- >
-
- <f:converter converterId="ContactConverter" />
-
- <f:selectItem
- itemValue="#{null}"
- itemLabel="#{msg.NONE_SELECTED}"
- />
-
- <f:selectItems
- value="#{contactListController.allContacts}"
- var="contact"
- itemValue="#{contact}"
- itemLabel="#{beanHelper.renderContact(contact)}"
- />
- </p:selectOneMenu>
-
- <p:outputLabel for="headquarterUserOwner" value="#{msg.ADMIN_ASSIGN_HEADQUARTER_USER_OWNER}" />
- <p:selectOneMenu
- id="headquarterUserOwner"
- value="#{adminHeadquarterActionController.headquarterUserOwner}"
- filter="true"
- filterMatchMode="contains"
- >
-
- <f:converter converterId="UserConverter" />
-
- <f:selectItem
- itemValue="#{null}"
- itemLabel="#{msg.NONE_SELECTED}"
- />
-
- <f:selectItems
- value="#{userListController.allUsers}"
- var="headquarterUserOwner"
- itemValue="#{headquarterUserOwner}"
- itemLabel="#{beanHelper.renderContact(headquarterUserOwner.userContact)} (#{headquarterUserOwner.userName})"
- />
- </p:selectOneMenu>
-
- <p:outputLabel for="headquarterEmailAddress" value="#{msg.ADMIN_ENTER_HEADQUARTER_EMAIL_ADDRESS}" />
- <p:inputText
- id="headquarterEmailAddress"
- size="40"
- maxlength="255"
- value="#{adminHeadquarterActionController.headquarterEmailAddress}"
- validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}"
- >
- <validator:headquarterEmailAddressValidator />
- </p:inputText>
-
- <p:outputLabel for="landLineCountry" value="#{msg.ADMIN_ENTER_HEADQUARTER_LAND_LINE_NUMBER}" />
- <core:inputLandLineNumberPanelGrid targetController="#{adminHeadquarterActionController}" />
-
- <p:outputLabel for="faxCountry" value="#{msg.ADMIN_ENTER_HEADQUARTER_FAX_NUMBER}" />
- <core:inputFaxNumberPanelGrid targetController="#{adminHeadquarterActionController}" />
- </p:panelGrid>
- </p:fieldset>
-
- <p:fieldset legend="#{msg.ADMIN_HEADQUARTER_ADDRESS_LEGEND}">
- <p:panelGrid
- layout="grid"
- columns="2"
- columnClasses="ui-grid-col-4,ui-grid-col-8"
- styleClass="ui-noborder"
- >
- <p:outputLabel for="headquarterStreet" value="#{msg.ADMIN_DATA_STREET_NAME}" />
- <p:inputText id="headquarterStreet" size="20" maxlength="255" value="#{adminHeadquarterActionController.headquarterStreet}" required="true" requiredMessage="#{msg.ADMIN_HEADQUARTER_STREET_NAME_REQUIRED}" />
-
- <p:outputLabel for="headquarterHouseNumber" value="#{msg.ADMIN_DATA_HOUSE_NUMBER}" />
- <p:inputText id="headquarterHouseNumber" size="3" maxlength="5" value="#{adminHeadquarterActionController.headquarterHouseNumber}" validatorMessage="#{msg.ENTERED_HOUSE_NUMBER_INVALID}" required="true" requiredMessage="#{msg.ADMIN_HEADQUARTER_HOUSE_NUMBER_REQUIRED}">
- <f:validateLongRange minimum="1" maximum="500" />
- </p:inputText>
-
- <p:outputLabel for="headquarterHouseNumberExtension" value="#{msg.ADMIN_DATA_HOUSE_NUMBER_EXTENSION}" />
- <p:inputText id="headquarterHouseNumberExtension" size="1" maxlength="255" value="#{adminHeadquarterActionController.headquarterHouseNumberExtension}" validatorMessage="#{msg.ENTERED_HOUSE_NUMBER_INVALID}" />
-
- <p:outputLabel for="headquarterLastHouseNumber" value="#{msg.ADMIN_DATA_LAST_HOUSE_NUMBER}" />
- <p:inputText id="headquarterLastHouseNumber" size="3" maxlength="5" value="#{adminHeadquarterActionController.headquarterLastHouseNumber}" validatorMessage="#{msg.ENTERED_HOUSE_NUMBER_INVALID}">
- <f:validateLongRange minimum="1" maximum="500" />
- </p:inputText>
-
- <p:outputLabel for="headquarterStore" value="#{msg.ADMIN_ENTER_DATA_STORE}" />
- <p:inputText id="headquarterStore" size="3" maxlength="5" value="#{adminHeadquarterActionController.headquarterStore}" validatorMessage="#{msg.ENTERED_STORE_INVALID}">
- <f:validateLongRange minimum="-5" maximum="200" />
- </p:inputText>
-
- <p:outputLabel for="headquarterSuiteNumber" value="#{msg.ADMIN_ENTER_DATA_SUITE_NUMBER}" />
- <p:inputText id="headquarterSuiteNumber" size="3" maxlength="5" value="#{adminHeadquarterActionController.headquarterSuiteNumber}" validatorMessage="#{msg.ENTERED_SUITE_NUMBER_INVALID}">
- <f:validateLongRange minimum="1" maximum="500" />
- </p:inputText>
-
- <p:outputLabel for="headquarterZipCode" value="#{msg.DATA_ZIP_CODE}" />
- <p:inputText id="headquarterZipCode" size="5" maxlength="6" value="#{adminHeadquarterActionController.headquarterZipCode}" required="true" requiredMessage="#{msg.ADMIN_HEADQUARTER_ZIP_CODE_REQUIRED}">
- <f:validateLongRange minimum="1" maximum="99999" />
- </p:inputText>
-
- <p:outputLabel for="headquarterCity" value="#{msg.ADMIN_DATA_CITY}" />
- <p:inputText id="headquarterCity" size="20" maxlength="255" value="#{adminHeadquarterActionController.headquarterCity}" required="true" requiredMessage="#{msg.ADMIN_HEADQUARTER_CITY_REQUIRED}" />
-
- <p:outputLabel for="headquarterCountry" value="#{msg.ADMIN_SELECT_COUNTRY}" />
- <core:outputCountrySelector id="headquarterCountry" value="#{adminHeadquarterActionController.headquarterCountry}" required="true" requiredMessage="#{msg.ADMIN_HEADQUARTER_COUNTRY_REQUIRED}" />
- </p:panelGrid>
- </p:fieldset>
-</ui:composition>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+@TODO: title="#{msg.ADMIN_HEADQUARTER_LEGEND_TITLE}"
+-->
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:core="http://mxchange.org/jsf/core/widgets"
+ xmlns:validator="http://mxchange.org/jsf/core/validators"
+ xmlns:f="http://xmlns.jcp.org/jsf/core"
+ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+ xmlns:p="http://primefaces.org/ui"
+ >
+
+ <p:fieldset legend="#{msg.ADMIN_HEADQUARTER_LEGEND}">
+ <p:panelGrid
+ layout="grid"
+ columns="2"
+ columnClasses="ui-grid-col-4,ui-grid-col-8"
+ styleClass="ui-noborder"
+ >
+ <p:outputLabel for="headquarterCompanyName" value="#{msg.ADMIN_HEADQUARTER_COMPANY_NAME}" />
+ <p:inputText
+ id="headquarterCompanyName"
+ value="#{adminHeadquarterActionController.headquarterCompanyName}"
+ size="30"
+ maxlength="200"
+ required="true"
+ requiredMessage="#{msg.ADMIN_HEADQUARTER_COMPANY_NAME_REQUIRED}"
+ >
+ <f:validator validatorId="HeadquarterCompanyNameValidator" />
+ <f:attribute name="checkExisting" value="false" />
+ </p:inputText>
+
+ <p:outputLabel for="headquarterContactEmployee" value="#{msg.ADMIN_ASSIGN_HEADQUARTER_CONTACT_EMPLOYEE}" />
+ <p:selectOneMenu
+ id="headquarterContactEmployee"
+ value="#{adminHeadquarterActionController.headquarterContactEmployee}"
+ filter="true"
+ filterMatchMode="contains"
+ >
+
+ <f:converter converterId="ContactConverter" />
+
+ <f:selectItem
+ itemValue="#{null}"
+ itemLabel="#{msg.NONE_SELECTED}"
+ />
+
+ <f:selectItems
+ value="#{contactListController.allContacts}"
+ var="contact"
+ itemValue="#{contact}"
+ itemLabel="#{beanHelper.renderContact(contact)}"
+ />
+ </p:selectOneMenu>
+
+ <p:outputLabel for="headquarterUserOwner" value="#{msg.ADMIN_ASSIGN_HEADQUARTER_USER_OWNER}" />
+ <p:selectOneMenu
+ id="headquarterUserOwner"
+ value="#{adminHeadquarterActionController.headquarterUserOwner}"
+ filter="true"
+ filterMatchMode="contains"
+ >
+
+ <f:converter converterId="UserConverter" />
+
+ <f:selectItem
+ itemValue="#{null}"
+ itemLabel="#{msg.NONE_SELECTED}"
+ />
+
+ <f:selectItems
+ value="#{userListController.allUsers}"
+ var="headquarterUserOwner"
+ itemValue="#{headquarterUserOwner}"
+ itemLabel="#{beanHelper.renderContact(headquarterUserOwner.userContact)} (#{headquarterUserOwner.userName})"
+ />
+ </p:selectOneMenu>
+
+ <p:outputLabel for="headquarterEmailAddress" value="#{msg.ADMIN_ENTER_HEADQUARTER_EMAIL_ADDRESS}" />
+ <p:inputText
+ id="headquarterEmailAddress"
+ size="40"
+ maxlength="255"
+ value="#{adminHeadquarterActionController.headquarterEmailAddress}"
+ validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}"
+ >
+ <validator:headquarterEmailAddressValidator />
+ </p:inputText>
+
+ <p:outputLabel for="landLineCountry" value="#{msg.ADMIN_ENTER_HEADQUARTER_LAND_LINE_NUMBER}" />
+ <core:inputLandLineNumberPanelGrid targetController="#{adminHeadquarterActionController}" />
+
+ <p:outputLabel for="faxCountry" value="#{msg.ADMIN_ENTER_HEADQUARTER_FAX_NUMBER}" />
+ <core:inputFaxNumberPanelGrid targetController="#{adminHeadquarterActionController}" />
+ </p:panelGrid>
+ </p:fieldset>
+
+ <p:fieldset legend="#{msg.ADMIN_HEADQUARTER_ADDRESS_LEGEND}">
+ <p:panelGrid
+ layout="grid"
+ columns="2"
+ columnClasses="ui-grid-col-4,ui-grid-col-8"
+ styleClass="ui-noborder"
+ >
+ <p:outputLabel for="headquarterStreet" value="#{msg.ADMIN_DATA_STREET_NAME}" />
+ <p:inputText id="headquarterStreet" size="20" maxlength="255" value="#{adminHeadquarterActionController.headquarterStreet}" required="true" requiredMessage="#{msg.ADMIN_HEADQUARTER_STREET_NAME_REQUIRED}" />
+
+ <p:outputLabel for="headquarterHouseNumber" value="#{msg.ADMIN_DATA_HOUSE_NUMBER}" />
+ <p:inputText id="headquarterHouseNumber" size="3" maxlength="5" value="#{adminHeadquarterActionController.headquarterHouseNumber}" validatorMessage="#{msg.ENTERED_HOUSE_NUMBER_INVALID}" required="true" requiredMessage="#{msg.ADMIN_HEADQUARTER_HOUSE_NUMBER_REQUIRED}">
+ <f:validateLongRange minimum="1" maximum="500" />
+ </p:inputText>
+
+ <p:outputLabel for="headquarterHouseNumberExtension" value="#{msg.ADMIN_DATA_HOUSE_NUMBER_EXTENSION}" />
+ <p:inputText id="headquarterHouseNumberExtension" size="1" maxlength="255" value="#{adminHeadquarterActionController.headquarterHouseNumberExtension}" validatorMessage="#{msg.ENTERED_HOUSE_NUMBER_INVALID}" />
+
+ <p:outputLabel for="headquarterLastHouseNumber" value="#{msg.ADMIN_DATA_LAST_HOUSE_NUMBER}" />
+ <p:inputText id="headquarterLastHouseNumber" size="3" maxlength="5" value="#{adminHeadquarterActionController.headquarterLastHouseNumber}" validatorMessage="#{msg.ENTERED_HOUSE_NUMBER_INVALID}">
+ <f:validateLongRange minimum="1" maximum="500" />
+ </p:inputText>
+
+ <p:outputLabel for="headquarterStore" value="#{msg.ADMIN_ENTER_DATA_STORE}" />
+ <p:inputText id="headquarterStore" size="3" maxlength="5" value="#{adminHeadquarterActionController.headquarterStore}" validatorMessage="#{msg.ENTERED_STORE_INVALID}">
+ <f:validateLongRange minimum="-5" maximum="200" />
+ </p:inputText>
+
+ <p:outputLabel for="headquarterSuiteNumber" value="#{msg.ADMIN_ENTER_DATA_SUITE_NUMBER}" />
+ <p:inputText id="headquarterSuiteNumber" size="3" maxlength="5" value="#{adminHeadquarterActionController.headquarterSuiteNumber}" validatorMessage="#{msg.ENTERED_SUITE_NUMBER_INVALID}">
+ <f:validateLongRange minimum="1" maximum="500" />
+ </p:inputText>
+
+ <p:outputLabel for="headquarterZipCode" value="#{msg.DATA_ZIP_CODE}" />
+ <p:inputText id="headquarterZipCode" size="5" maxlength="6" value="#{adminHeadquarterActionController.headquarterZipCode}" required="true" requiredMessage="#{msg.ADMIN_HEADQUARTER_ZIP_CODE_REQUIRED}">
+ <f:validateLongRange minimum="1" maximum="99999" />
+ </p:inputText>
+
+ <p:outputLabel for="headquarterCity" value="#{msg.ADMIN_DATA_CITY}" />
+ <p:inputText id="headquarterCity" size="20" maxlength="255" value="#{adminHeadquarterActionController.headquarterCity}" required="true" requiredMessage="#{msg.ADMIN_HEADQUARTER_CITY_REQUIRED}" />
+
+ <p:outputLabel for="headquarterCountry" value="#{msg.ADMIN_SELECT_COUNTRY}" />
+ <core:outputCountrySelector id="headquarterCountry" value="#{adminHeadquarterActionController.headquarterCountry}" required="true" requiredMessage="#{msg.ADMIN_HEADQUARTER_COUNTRY_REQUIRED}" />
+ </p:panelGrid>
+ </p:fieldset>
+</ui:composition>
<h:outputText value="#{msg.ADMIN_ADD_HEADQUARTER_MINIMUM_DATA}" />
</h:panelGroup>
- <ui:include src="/WEB-INF/templates/admin/headquarter/admin_form_headquarter.tpl" />
+ <ui:include src="/WEB-INF/templates/admin/headquarter/admin_form_headquarter_data.tpl" />
<f:facet name="footer">
<p:panelGrid columns="2" layout="grid">