*/
private String companyName;
+ /**
+ * Company short name
+ */
+ private String companyShortName;
+
/**
* Tax number
*/
* <p>
*/
public void addBusinessBasicData () {
- // First, validate all parameter
- if (this.getCompanyName() == null) {
+ // Check if company short name is set
+ if (this.getCompanyShortName() == null) {
// Is null
- throw new NullPointerException("this.companyName is null"); //NOI18N
- } else if (this.getCompanyName().isEmpty()) {
+ throw new NullPointerException("this.companyShortName is null"); //NOI18N
+ } else if (this.getCompanyShortName().isEmpty()) {
// Is null
- throw new IllegalArgumentException("this.companyName is empty"); //NOI18N
+ throw new IllegalArgumentException("this.companyShortName is empty"); //NOI18N
}
// Prepare entity
- BasicData basicData = new BusinessBasicData(this.getCompanyName());
+ BasicData basicData = new BusinessBasicData(this.getCompanyShortName());
// Set all opther remaining data
basicData.setCompanyComments(this.getCompanyComments());
basicData.setCompanyEmailAddress(this.getCompanyEmailAddress());
basicData.setCompanyFounder(this.getCompanyFounder());
basicData.setCompanyHeadquarterData(this.getCompanyHeadQuarter());
+ basicData.setCompanyName(this.getCompanyName());
basicData.setCompanyTaxNumber(this.getCompanyTaxNumber());
basicData.setCompanyUserOwner(this.getCompanyUserOwner());
basicData.setCompanyWebsiteUrl(this.getCompanyWebsiteUrl());
this.companyName = companyName;
}
+ /**
+ * Getter for company short name
+ * <p>
+ * @return Company short name
+ */
+ public String getCompanyShortName () {
+ return this.companyShortName;
+ }
+
+ /**
+ * Setter for company short name
+ * <p>
+ * @param companyShortName Company short name
+ */
+ public void setCompanyShortName (final String companyShortName) {
+ this.companyShortName = companyShortName;
+ }
+
/**
* Getter for company tax number
* <p>
} else if (event.getBasicData().getBasicDataId() < 1) {
// Throw IAE
throw new IllegalArgumentException(MessageFormat.format("event.basicData.basicDataId={0} is invalid", event.getBasicData().getBasicDataId())); //NOI18N
- } else if (event.getBasicData().getCompanyName() == null) {
+ } else if (event.getBasicData().getCompanyShortName() == null) {
// Throw NPE again
throw new NullPointerException("event.basicData.companyName is null"); //NOI18N
- } else if (event.getBasicData().getCompanyName().isEmpty()) {
+ } else if (event.getBasicData().getCompanyShortName().isEmpty()) {
// Throw IAE again
throw new IllegalArgumentException("event.basicData.companyName is empty"); //NOI18N
}
return isFound;
}
+ @Override
+ public Boolean isCompanyShortNameUsed (final String companyShortName) {
+ // Validate parameter
+ if (null == companyShortName) {
+ // Throw NPE
+ throw new NullPointerException("companyShortName is null"); //NOI18N
+ } else if (companyShortName.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("companyShortName is empty"); //NOI18N
+ }
+
+ // Default is not found
+ boolean isFound = false;
+
+ // Check all entries
+ for (final BasicData basicData : this.getAllBasicData()) {
+ // Is same company name?
+ if (Objects.equals(basicData.getCompanyShortName(), companyShortName)) {
+ // Found it
+ isFound = true;
+ break;
+ }
+ }
+
+ // Return flag
+ return isFound;
+ }
+
@Override
public Boolean isEmailAddressRegistered (final String emailAddress) {
// Validate parameter
*/
Boolean isCompanyNameUsed (final String companyName);
+ /**
+ * Checks whether given company short name already exists
+ * <p>
+ * @param companyShortName Company short name to check
+ * <p>
+ * @return Whether the company short name exists
+ */
+ Boolean isCompanyShortNameUsed (final String companyShortName);
+
}
final String[] requiredFields = {"companyName"}; //NOI18N
// Pre-validation (example: not null, not a string, empty string ...)
- super.preValidate(context, component, value, requiredFields, false);
+ super.preValidate(context, component, value, requiredFields, true);
// Convert name to string (now securely checked in BaseStringValidator)
final String companyName = (String) value;
}
// Check if name is already used
- final Boolean nameExists = BASIC_DATA_LIST_CONTROLLER.isCompanyNameUsed(companyName);
+ final Boolean nameExists = (companyName != null && BASIC_DATA_LIST_CONTROLLER.isCompanyNameUsed(companyName));
// Is the user id valid?
if ((!nameExists) && (checkExisting)) {
--- /dev/null
+/*
+ * Copyright (C) 2017, 2018 Free Software Foundation
+ *
+ * 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.validator.business.basicdata;
+
+import java.text.MessageFormat;
+import javax.enterprise.inject.spi.CDI;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.FacesValidator;
+import javax.faces.validator.ValidatorException;
+import org.mxchange.jcoreee.validator.string.BaseStringValidator;
+import org.mxchange.jjobs.beans.business.basicdata.list.JobsBasicDataListWebViewBean;
+import org.mxchange.jjobs.beans.business.basicdata.list.JobsBasicDataListWebViewController;
+
+/**
+ * A validator for basic data company short names
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@FacesValidator (value = "BasicDataCompanyShortNameValidator")
+public class JobsBasicDataCompanyShortNameValidator extends BaseStringValidator {
+
+ /**
+ * Business basic data backing bean
+ */
+ private static JobsBasicDataListWebViewController BASIC_DATA_LIST_CONTROLLER;
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 57_283_657_476_562L;
+
+ @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
+
+ // Pre-validation (example: not null, not a string, empty string ...)
+ super.preValidate(context, component, value, requiredFields, false);
+
+ // Convert name to string (now securely checked in BaseStringValidator)
+ final String companyShortName = (String) value;
+
+ // Default is to check on existing names
+ Boolean checkExisting = Boolean.TRUE;
+
+ // Is attribute "allowEmptyRequiredData" set?
+ if (component.getAttributes().containsKey("checkExisting")) { //NOI18N
+ // Get attribute
+ final Object attribute = component.getAttributes().get("checkExisting"); //NOI18N
+
+ // Make sure, it is Boolean as no String is accepted anymore
+ if (!(attribute instanceof String)) {
+ // Not valid attribute, please use "true" or "false" (default)
+ throw new IllegalArgumentException("checkExisting must be of type String. Please use \"true\" or \"false\" for f:attribute value."); //NOI18N
+ }
+
+ // Securely cast it
+ checkExisting = Boolean.parseBoolean((String) attribute);
+ }
+
+ // Check if name is already used
+ final Boolean nameExists = BASIC_DATA_LIST_CONTROLLER.isCompanyShortNameUsed(companyShortName);
+
+ // Is the user id valid?
+ if ((!nameExists) && (checkExisting)) {
+ // Format message
+ final String message = MessageFormat.format("No basic data found with comany name {0}.", companyShortName);
+
+ // Name does not exist
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_WARN, message, message)); //NOI18N
+ } else if ((nameExists) && (!checkExisting)) {
+ // Format message
+ final String message = MessageFormat.format("Found basic data with comany name {0}.", companyShortName);
+
+ // Name already exists
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_WARN, message, message)); //NOI18N
+ }
+ }
+
+}
* 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.validator.business.basicdata;
+package org.mxchange.jjobs.validator.business.branchoffice;
import java.text.MessageFormat;
import java.util.regex.Pattern;
ADMIN_ENTER_COUNTRY_PHONE_CODE=Vorwahl f\u00fcr das Land:
ADMIN_ENTER_COUNTRY_PHONE_CODE_EXAMPLE=(Beispiel: 49 f\u00fcr Deutschland)
BUTTON_ADMIN_ADD_COUNTRY=L\u00e4nderdaten hinzuf\u00fcgen
-ID_NUMBER_HEADER=Id-Nummer:
+ID_HEADER=Id:
ADMIN_LIST_COUNTRY_DATA_COUNTRY_CODE=L\u00e4ndercode:
ADMIN_LIST_COUNTRY_DATA_COUNTRY_EXTERNAL_DIAL_PREFIX=Vorwahl ausserorts:
ADMIN_LIST_COUNTRY_DATA_COUNTRY_NAME=Land:
ADMIN_BASIC_DATA_LEGEND=Basisdaten fuer geschaeftlichen Kontakt:
#@TODO Please fix German umlauts!
ADMIN_BASIC_DATA_LEGEND_TITLE=Geben Sie die Basisdaten fuer einen geschaeftlichen Kontakt ein.
-ADMIN_BASIC_DATA_COMPANY_NAME_REQUIRED=Bitte geben Sie den Firmennamen inklusive Rechtsform ein.
+ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_REQUIRED=Bitte geben Sie den kurzen Firmennamen ein.
ADMIN_BASIC_DATA_COMPANY_LEGAL_STATUS=Rechtsform (z.B. GmbH):
ADMIN_BASIC_DATA_COMPANY_EMAIL_ADDRESS=Haupt-Email-Adresse:
#@TODO Please fix German umlauts!
#@TODO Please fix German umlauts!
BACK=Zurueck
OPTIONS=Optionen
+ADMIN_BASIC_DATA_COMPANY_SHORT_NAME=Kurzer Firmenname:
+ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_HEADER=Kurzer Name:
ADMIN_ENTER_COUNTRY_PHONE_CODE=Dial prefix for this country:
ADMIN_ENTER_COUNTRY_PHONE_CODE_EXAMPLE=(Example: 1 for U.S.A.)
BUTTON_ADMIN_ADD_COUNTRY=Add country data
-ID_NUMBER_HEADER=Id number:
+ID_HEADER=Id:
ADMIN_LIST_COUNTRY_DATA_COUNTRY_CODE=Country code:
ADMIN_LIST_COUNTRY_DATA_COUNTRY_EXTERNAL_DIAL_PREFIX=Dial prefix outside:
ADMIN_LIST_COUNTRY_DATA_COUNTRY_NAME=Country:
ENTERED_EMAIL_ADDRESS_IS_INVALID=Your entered email address is not valid.
ADMIN_BASIC_DATA_LEGEND=Basic data for business contact:
ADMIN_BASIC_DATA_LEGEND_TITLE=Enter basic data for a business contact.
-ADMIN_BASIC_DATA_COMPANY_NAME_REQUIRED=Please enter the company's name including legal status.
+ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_REQUIRED=Please enter the company's short name.
ADMIN_BASIC_DATA_COMPANY_LEGAL_STATUS=Legal status (e.g. Inc.):
ADMIN_BASIC_DATA_COMPANY_EMAIL_ADDRESS=Main email address:
BUTTON_ADMIN_ADD_BASIC_DATA=Add basic data
EMPLOYEE_NUMBER_HEADER=Employee number:
BACK=Back
OPTIONS=Options
+ADMIN_BASIC_DATA_COMPANY_SHORT_NAME=Company's short name
+ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_HEADER=Short name:
</p:submenu>
</p:slideMenu>
- <p:commandButton oncomplete="PF('menuSidebar').hide()" value="Hide!" process="@form" />
+ <p:commandButton
+ oncomplete="PF('menuSidebar').hide()"
+ value="Hide!"
+ />
</p:sidebar>
- <p:commandButton oncomplete="PF('menuSidebar').show()" value="Show!" process="@form" />
+ <p:commandButton
+ oncomplete="PF('menuSidebar').show()"
+ value="Show!"
+ />
</h:form>
</ui:composition>
columnClasses="ui-grid-col-4,ui-grid-col-8"
styleClass="ui-noborder"
>
+ <p:outputLabel for="companyShortName" value="#{msg.ADMIN_BASIC_DATA_COMPANY_SHORT_NAME}" />
+ <p:inputText
+ id="companyShortName"
+ value="#{adminBasicCompanyDataController.companyShortName}"
+ size="20"
+ maxlength="100"
+ required="true"
+ requiredMessage="#{msg.ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_REQUIRED}"
+ >
+ <f:validator validatorId="BasicDataCompanyShortNameValidator" />
+ <f:attribute name="checkExisting" value="false" />
+ </p:inputText>
+
<p:outputLabel for="companyName" value="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME}" />
<p:inputText
id="companyName"
value="#{adminBasicCompanyDataController.companyName}"
size="30"
- maxlength="200"
- required="true"
- requiredMessage="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME_REQUIRED}"
+ maxlength="255"
>
<f:validator validatorId="BasicDataCompanyNameValidator" />
<f:attribute name="checkExisting" value="false" />
<core:outputMessageBox panelGroupId="errorHelperContactAddFax" message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
- <h:form id="form_add_contact_fax" rendered="#{not empty beanHelper.contact}">
+ <h:form rendered="#{not empty beanHelper.contact}">
<h:panelGroup layout="block">
<div class="table-header">
<h:outputText value="#{msg.ADMIN_ADD_CONTACT_FAX_NUMBER_FORM_TITLE}" />
/>
<p:commandButton
- process="@form"
type="submit"
action="#{adminContactPhoneController.doLinkMainFaxNumber()}"
value="#{msg.BUTTON_ADMIN_LINK_ADD_CONTACT_FAX_NUMBER}"
required="true"
requiredMessage="#{msg.ADMIN_HEADQUARTER_COMPANY_NAME_REQUIRED}"
>
- <f:validator validatorId="BasicDataCompanyNameValidator" />
+ <f:validator validatorId="HeadquarterCompanyNameValidator" />
<f:attribute name="checkExisting" value="false" />
</p:inputText>
<core:outputMessageBox panelGroupId="errorHelperContactAddLandline" message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
- <h:form id="form_add_contact_landline" rendered="#{not empty beanHelper.contact}">
+ <h:form rendered="#{not empty beanHelper.contact}">
<h:panelGroup layout="block">
<div class="table-header">
<h:outputText value="#{msg.ADMIN_ADD_CONTACT_LAND_LINE_NUMBER_FORM_TITLE}" />
/>
<p:commandButton
- process="@form"
type="submit"
action="#{adminContactPhoneController.doLinkAddLandLineNumber(beanHelper.contact)}"
value="#{msg.BUTTON_ADMIN_LINK_ADD_CONTACT_LAND_LINE_NUMBER}"
<core:outputMessageBox panelGroupId="errorHandlerAddMobileContact" message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
- <h:form id="form_add_contact_mobile" rendered="#{not empty beanHelper.contact}">
+ <h:form rendered="#{not empty beanHelper.contact}">
<h:panelGroup layout="block">
<div class="table-header">
<h:outputText value="#{msg.ADMIN_ADD_CONTACT_MOBILE_NUMBER_FORM_TITLE}" />
/>
<p:commandButton
- process="@form"
type="submit"
action="#{adminContactPhoneController.doLinkAddMobileNumber(beanHelper.contact)}"
value="#{msg.BUTTON_ADMIN_LINK_ADD_CONTACT_MOBILE_NUMBER}"
<h:outputText styleClass="alert-danger" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" rendered="#{empty beanHelper.contact}" />
- <h:form id="form_add_contact_mobile">
+ <h:form>
</h:form>
</ui:composition>
</ui:define>
<ui:define name="content">
- <h:form id="form-admin-logout">
+ <h:form>
<h:panelGroup styleClass="table" layout="block">
<div class="table-header">
<h:outputText value="#{msg.ADMIN_LOGOUT_TITLE}" />
<p:panelGrid columns="2" layout="grid">
<p:commandButton
- process="@form"
type="submit"
action="#{userLoginController.doAdminLogout()}"
value="#{msg.BUTTON_USER_LOGOUT}"
oncomplete="PF('basicDataDialog').show()"
/>
- <p:column headerText="#{msg.ID_NUMBER_HEADER}" sortBy="#{basicData.basicDataId}" filterable="false">
+ <p:column headerText="#{msg.ID_HEADER}" sortBy="#{basicData.basicDataId}" filterable="false">
<p:link outcome="admin_show_basic_data" title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}" value="#{basicData.basicDataId}">
<f:param name="basicDataId" value="#{basicData.basicDataId}" />
</p:link>
</p:column>
- <p:column headerText="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME_HEADER}" sortBy="#{basicData.companyName}" filterBy="#{basicData.companyName}" filterMatchMode="contains">
+ <p:column headerText="#{msg.ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_HEADER}" sortBy="#{basicData.companyShortName}" filterBy="#{basicData.companyShortName}" filterMatchMode="contains">
<h:outputLink value="#{basicData.companyWebsiteUrl}" target="_blank" title="#{msg.LINK_COMPANY_WEBSITE_URL_TITLE}" rel="external" rendered="#{not empty basicData.companyWebsiteUrl}">
- <h:outputText value="#{basicData.companyName}" />
+ <h:outputText value="#{basicData.companyShortName}" />
</h:outputLink>
- <h:outputText value="#{basicData.companyName}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty basicData.companyWebsiteUrl}" />
+ <h:outputText value="#{basicData.companyShortName}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty basicData.companyWebsiteUrl}" />
+ </p:column>
+
+ <p:column headerText="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME_HEADER}" sortBy="#{basicData.companyName}" filterBy="#{basicData.companyName}" filterMatchMode="contains">
+ <h:outputText value="#{basicData.companyName}" rendered="#{not empty basicData.companyName}" />
+
+ <h:outputText value="-" rendered="#{empty basicData.companyName}" />
</p:column>
<p:column headerText="#{msg.ADMIN_COMPANY_CONTACT_PERSON_HEADER}" sortBy="#{basicData.companyContactEmployee}" filterBy="#{basicData.companyContactEmployee}" filterMatchMode="in">
</h:outputFormat>
</f:facet>
- <p:outputLabel value="#{msg.ID_NUMBER_HEADER}" title="#{msg.BASIC_DATA_ID_NUMBER_TITLE}" />
+ <p:outputLabel value="#{msg.ID_HEADER}" title="#{msg.BASIC_DATA_ID_NUMBER_TITLE}" />
<h:outputText value="#{basicDataListController.selectedBasicData.basicDataId}" />
</p:panelGrid>
</p:outputPanel>
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_ADD_BASIC_DATA}"
action="#{adminBasicCompanyDataController.addBusinessBasicData()}"
oncomplete="PF('branchOfficeDialog').show()"
/>
- <p:column headerText="#{msg.ID_NUMBER_HEADER}" sortBy="#{branchOffice.branchId}" filterable="false">
+ <p:column headerText="#{msg.ID_HEADER}" sortBy="#{branchOffice.branchId}" filterable="false">
<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>
</h:outputFormat>
</f:facet>
- <p:outputLabel value="#{msg.ID_NUMBER_HEADER}" title="#{msg.BRANCH_OFFICE_ID_NUMBER_TITLE}" />
+ <p:outputLabel value="#{msg.ID_HEADER}" title="#{msg.BRANCH_OFFICE_ID_NUMBER_TITLE}" />
<h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchId}" />
<p:outputLabel value="#{msg.BRANCH_OFFICE_NUMBER_HEADER}" title="#{msg.BRANCH_OFFICE_NUMBER_TITLE}" />
</p:dialog>
</h:form>
- <h:form id="form-add-branch-office">
+ <h:form>
<p:panelGrid
columns="1"
layout="grid"
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_ADD_BASIC_DATA}"
action="#{adminBranchOfficeController.addBranchOffice()}"
</p:fieldset>
</h:form>
- <h:form id="form-admin-add-branch-opening-time">
+ <h:form>
<p:panelGrid
columns="1"
layout="grid"
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME}"
action="#{adminBranchOfficeController.addOpeningTime()}"
<ui:define name="content">
<core:outputMessageBox panelGroupId="errorHandlerDeleteContact" message="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
- <h:form id="form-admin-delete-user" rendered="#{not empty beanHelper.contact}">
+ <h:form rendered="#{not empty beanHelper.contact}">
<h:inputHidden value="#{adminContactController.contactId}" />
<h:panelGroup styleClass="table" layout="block">
<ui:include src="/WEB-INF/templates/admin/contact/admin_show_contact_data.tpl" />
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_DELETE_CONTACT}"
action="#{adminContactController.deleteContactData()}"
<ui:define name="content">
<core:outputMessageBox panelGroupId="errorHandlerEditContact" message="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
- <h:form id="form-admin-edit-contact" rendered="#{not empty beanHelper.contact}">
+ <h:form rendered="#{not empty beanHelper.contact}">
<h:inputHidden value="#{adminContactController.contactId}" />
<h:panelGroup layout="block">
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_EDIT_CONTACT}"
action="#{adminContactController.editContactData()}"
</ui:define>
<ui:define name="content">
- <h:form id="form_export_contacts" rendered="#{not contactController.allContacts().isEmpty()}">
+ <h:form rendered="#{not contactController.allContacts().isEmpty()}">
<p:dataTable
id="table_export_contacts"
var="contact"
<p:panelGrid columns="2" layout="grid">
<p:commandButton
ajax="false"
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_EXPORT_CONTACTS_XLS}"
>
value="#{msg.BUTTON_RESET_FORM}"
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_ADD_CONTACT}"
action="#{adminContactController.addContact()}"
<core:outputMessageBox panelGroupId="errorHandlerUnlinkContact" message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
- <h:form id="form_unlink_contact_fax" rendered="#{not empty beanHelper.faxNumber and not empty beanHelper.contact and beanHelper.contact.contactFaxNumber == beanHelper.faxNumber}">
+ <h:form rendered="#{not empty beanHelper.faxNumber and not empty beanHelper.contact and beanHelper.contact.contactFaxNumber == beanHelper.faxNumber}">
<h:inputHidden value="#{adminContactPhoneController.contact}" />
<h:inputHidden value="#{adminContactPhoneController.phoneId}" />
<p:panelGrid columns="2" layout="grid">
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_UNLINK_FAX_NUMBER}"
action="#{adminContactPhoneController.unlinkFaxContactData()}"
<core:outputMessageBox panelGroupId="errorHandlerUnlinkContact" message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
- <h:form id="form_unlink_contact_landline" rendered="#{not empty beanHelper.landLineNumber and not empty beanHelper.contact and beanHelper.contact.contactLandLineNumber == beanHelper.landLineNumber}">
+ <h:form rendered="#{not empty beanHelper.landLineNumber and not empty beanHelper.contact and beanHelper.contact.contactLandLineNumber == beanHelper.landLineNumber}">
<h:panelGroup styleClass="table" layout="block">
<div class="table-header">
<h:outputText value="#{msg.ADMIN_UNLINK_CONTACT_LAND_LINE_NUMBER_TITLE}" />
<p:panelGrid columns="2" layout="grid">
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_UNLINK_LAND_LINE_NUMBER}"
action="#{adminContactPhoneController.unlinkLandLineContactData()}"
<core:outputMessageBox panelGroupId="errorHandlerUnlinkContact" message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
- <h:form id="form_unlink_contact_mobile" rendered="#{not empty beanHelper.mobileNumber and not empty beanHelper.contact and beanHelper.contact.contactMobileNumber == beanHelper.mobileNumber}">
+ <h:form rendered="#{not empty beanHelper.mobileNumber and not empty beanHelper.contact and beanHelper.contact.contactMobileNumber == beanHelper.mobileNumber}">
<h:panelGroup styleClass="table" layout="block">
<div class="table-header">
<h:outputText value="#{msg.ADMIN_UNLINK_CONTACT_MOBILE_NUMBER_TITLE}" />
</div>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_UNLINK_MOBILE_NUMBER}"
action="#{adminContactPhoneController.unlinkMobileContactData()}"
>
<p:column>
<f:facet name="header">
- <h:outputText value="#{msg.ID_NUMBER_HEADER}" />
+ <h:outputText value="#{msg.ID_HEADER}" />
</f:facet>
<p:link outcome="admin_show_country" title="#{msg.ADMIN_LINK_SHOW_COUNTRY_TITLE}" value="#{country.countryId}">
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_ADD_COUNTRY}"
action="#{adminCountryController.addCountry()}"
</p:panelGrid>
</f:facet>
- <p:column headerText="#{msg.ID_NUMBER_HEADER}" sortBy="#{department.departmentId}" filterable="false">
+ <p:column headerText="#{msg.ID_HEADER}" sortBy="#{department.departmentId}" filterable="false">
<p:link outcome="admin_show_department" title="#{msg.ADMIN_LINK_SHOW_DEPARTMENT_TITLE}" value="#{department.departmentId}">
<f:param name="departmentId" value="#{department.departmentId}" />
</p:link>
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_ADD_DEPARTMENT_DATA}"
action="#{adminDepartmentController.addDepartment()}"
</p:panelGrid>
</f:facet>
- <p:column headerText="#{msg.ID_NUMBER_HEADER}" sortBy="#{employee.employeeId}" filterable="false">
+ <p:column headerText="#{msg.ID_HEADER}" sortBy="#{employee.employeeId}" filterable="false">
<p:link outcome="admin_show_employee" title="#{msg.ADMIN_LINK_SHOW_EMPLOYEE_TITLE}" value="#{employee.employeeId}">
<f:param name="employeeId" value="#{employee.employeeId}" />
</p:link>
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_ADD_EMPLOYEE}"
action="#{adminEmployeeController.addEmployee()}"
<ui:define name="content">
<core:outputMessageBox panelGroupId="errorHandlerDeleteFax" message="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.faxNumber}" />
- <h:form id="form_delete_fax" rendered="#{not empty beanHelper.faxNumber}">
+ <h:form rendered="#{not empty beanHelper.faxNumber}">
<h:inputHidden value="#{adminPhoneController.phoneId}" />
<h:panelGroup styleClass="table" layout="block">
</div>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_DELETE_FAX}"
action="#{adminPhoneController.deleteFaxData()}"
<ui:define name="content">
<core:outputMessageBox panelGroupId="errorHandlerEditFax" message="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.faxNumber}" />
- <h:form id="form_edit_fax" rendered="#{not empty beanHelper.faxNumber}">
+ <h:form rendered="#{not empty beanHelper.faxNumber}">
<h:inputHidden value="#{adminPhoneController.phoneId}" />
<h:panelGroup layout="block">
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_EDIT_FAX_NUMBER}"
action="#{adminPhoneController.doChangeFaxNumber()}"
>
<p:column>
<f:facet name="header">
- <h:outputText value="#{msg.ID_NUMBER_HEADER}" />
+ <h:outputText value="#{msg.ID_HEADER}" />
</f:facet>
<p:link outcome="admin_show_fax" value="#{faxNumber.phoneId}" title="#{msg.ADMIN_LINK_SHOW_FAX_NUMBER_TITLE}">
</p:panelGrid>
</f:facet>
- <p:column headerText="#{msg.ID_NUMBER_HEADER}" sortBy="#{headquarter.headquarterId}" filterable="false">
+ <p:column headerText="#{msg.ID_HEADER}" sortBy="#{headquarter.headquarterId}" filterable="false">
<p:link outcome="admin_show_headquarter" title="#{msg.ADMIN_LINK_SHOW_HEADQUARTER_TITLE}" value="#{headquarter.headquarterId}">
<f:param name="headquarterId" value="#{headquarter.headquarterId}" />
</p:link>
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_ADD_HEADQUARTER}"
action="#{adminHeadquarterController.addHeadquarter()}"
</p:fieldset>
</h:form>
- <h:form id="form-admin-add-headquarter-opening-time">
+ <h:form>
<p:panelGrid
columns="1"
layout="grid"
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_ADD_HEADQUARTER_OPENING_TIME}"
action="#{adminHeadquarterController.addOpeningTime()}"
<ui:define name="content">
<core:outputMessageBox panelGroupId="errorHandlerDeleteLandline" message="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.landLineNumber}" />
- <h:form id="form_delete_landline" rendered="#{not empty beanHelper.landLineNumber}">
+ <h:form rendered="#{not empty beanHelper.landLineNumber}">
<h:panelGroup styleClass="table" layout="block">
<div class="table-header">
<h:outputText value="#{msg.ADMIN_DELETE_LAND_LINE_TITLE}" />
</div>
<div class="para">
- <core:outputAdminLandLinePanelGrid landLineNumber="#{beanHelper.landLineNumber}" renderShowLink="false" showAdminDropdownMenu="false" />
+ <core:outputAdminLandLinePanelGrid
+ landLineNumber="#{beanHelper.landLineNumber}"
+ renderShowLink="false"
+ showAdminDropdownMenu="false"
+ />
</div>
<div class="para">
</div>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_DELETE_LAND_LINE}"
action="#{adminPhoneController.deleteLandLineData()}"
<ui:define name="content">
<core:outputMessageBox panelGroupId="errorHandlerEditLandline" message="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.landLineNumber}" />
- <h:form id="form_edit_landline" rendered="#{not empty beanHelper.landLineNumber}">
+ <h:form rendered="#{not empty beanHelper.landLineNumber}">
<h:panelGroup layout="block">
<div class="table-header">
<h:outputFormat value="#{msg.ADMIN_EDIT_LAND_LINE_NUMBER_TITLE}">
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_EDIT_LAND_LINE_NUMBER}"
action="#{adminPhoneController.doChangeLandLineNumber()}"
>
<p:column>
<f:facet name="header">
- <h:outputText value="#{msg.ID_NUMBER_HEADER}" />
+ <h:outputText value="#{msg.ID_HEADER}" />
</f:facet>
<p:link outcome="admin_show_landline" value="#{landLineNumber.phoneId}" title="#{msg.ADMIN_LINK_SHOW_LANDLINE_NUMBER_TITLE}">
<ui:define name="content">
<core:outputMessageBox panelGroupId="errorHandlerDeleteMobile" message="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.mobileNumber}" />
- <h:form id="form_delete_mobile" rendered="#{not empty beanHelper.mobileNumber}">
+ <h:form rendered="#{not empty beanHelper.mobileNumber}">
<h:panelGroup styleClass="table" layout="block">
<div class="table-header">
<h:outputText value="#{msg.ADMIN_DELETE_MOBILE_TITLE}" />
</div>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_DELETE_MOBILE_NUMBER}"
action="#{adminPhoneController.deleteMobileData()}"
<ui:define name="content">
<core:outputMessageBox panelGroupId="errorHandlerEditMobile" message="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.mobileNumber}" />
- <h:form id="form_edit_mobile" rendered="#{not empty beanHelper.mobileNumber}">
+ <h:form rendered="#{not empty beanHelper.mobileNumber}">
<h:panelGroup layout="block">
<div class="table-header">
<h:outputFormat value="#{msg.ADMIN_EDIT_MOBILE_NUMBER_TITLE}">
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_EDIT_MOBILE_NUMBER}"
action="#{adminPhoneController.doUpdateMobileNumber()}"
>
<p:column>
<f:facet name="header">
- <h:outputText value="#{msg.ID_NUMBER_HEADER}" />
+ <h:outputText value="#{msg.ID_HEADER}" />
</f:facet>
<p:link outcome="admin_show_mobile" value="#{mobileNumber.phoneId}" title="#{msg.ADMIN_LINK_SHOW_MOBILE_NUMBER_TITLE}">
</p:panelGrid>
</f:facet>
- <p:column headerText="#{msg.ID_NUMBER_HEADER}" sortBy="#{mobileProvider.providerId}" filterBy="#{mobileProvider.providerId}">
+ <p:column headerText="#{msg.ID_HEADER}" 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:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_ADD_MOBILE_PROVIDER}"
action="#{adminMobileProviderController.addMobileProvider()}"
</p:panelGrid>
</f:facet>
- <p:column headerText="#{msg.ID_NUMBER_HEADER}" sortBy="#{openingTime.openingId}" filterable="false">
+ <p:column headerText="#{msg.ID_HEADER}" sortBy="#{openingTime.openingId}" filterable="false">
<p:link outcome="admin_show_opening_time" title="#{msg.ADMIN_LINK_SHOW_DEPARTMENT_TITLE}" value="#{openingTime.openingId}">
<f:param name="openingId" value="#{openingTime.openingId}" />
</p:link>
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_ADD_OPENING_TIME}"
action="#{adminOpeningTimeController.addOpeningTime()}"
<ui:define name="content">
<core:outputMessageBox panelGroupId="errorHandlerDeleteUser" message="#{msg.ERROR_USER_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" />
- <h:form id="form-admin-delete-user" rendered="#{not empty beanHelper.user}">
+ <h:form rendered="#{not empty beanHelper.user}">
<h:panelGroup layout="block">
<div class="table-header">
<h:outputFormat value="#{msg.ADMIN_DELETE_USER_TITLE}">
</h:panelGroup>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_DELETE_USER}"
action="#{adminUserController.deleteUserData()}"
<ui:define name="content">
<core:outputMessageBox panelGroupId="errorHandlerEditUser" message="#{msg.ERROR_USER_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" />
- <h:form id="form_edit_user" rendered="#{not empty beanHelper.user}">
+ <h:form rendered="#{not empty beanHelper.user}">
<h:panelGroup layout="block">
<div class="table-header">
<h:outputText value="#{msg.ADMIN_EDIT_USER_TITLE}" />
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_EDIT_USER}"
action="#{adminUserController.editUserData()}"
</ui:define>
<ui:define name="content">
- <h:form id="form_export_users">
+ <h:form id="form-export-users">
<p:dataTable
- id="table_export_users"
+ id="table-export-users"
var="user"
value="#{userController.allUsers()}"
paginator="true"
<p:commandButton
ajax="false"
- process="@form"
type="submit"
value="#{msg.BUTTON_ADMIN_EXPORT_USERS_XLS}"
>
<p:dataExporter
type="xls"
- target="table_export_users"
+ target="table-export-users"
fileName="all_users"
/>
</p:commandButton>
/>
<p:commandButton
- process="@form"
type="submit"
id="submit_add_user"
value="#{msg.BUTTON_ADMIN_ADD_USER}"
<ui:define name="content">
<core:outputMessageBox panelGroupId="errorHandlerLockUser" message="#{msg.ERROR_USER_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" />
- <h:form id="form-admin-user-lock" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'CONFIRMED'}">
+ <h:form rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'CONFIRMED'}">
<h:panelGroup layout="block">
<div class="table-header">
<h:outputFormat value="#{msg.ADMIN_LOCK_USER_TITLE}">
/>
<p:commandButton
- process="@form"
type="submit"
action="#{adminUserController.lockUserAccount()}"
value="#{msg.BUTTON_ADMIN_LOCK_USER_ACCOUNT}"
<ui:define name="content">
<core:outputMessageBox panelGroupId="errorHandlerResendLinkUser" message="#{msg.ERROR_USER_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" />
- <h:form id="form-admin-user-resend" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'UNCONFIRMED'}">
+ <h:form rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'UNCONFIRMED'}">
<h:panelGroup layout="block">
<div class="table-header">
<h:outputFormat value="#{msg.ADMIN_RESEND_USER_CONFIRMATION_LINK_TITLE}">
/>
<p:commandButton
- process="@form"
type="submit"
action="#{adminUserController.resendConfirmationLink()}"
value="#{msg.BUTTON_ADMIN_RESEND_USER_CONFIRMATION_LINK_ACCOUNT}"
<ui:define name="content">
<core:outputMessageBox panelGroupId="errorHandlerUnlockUser" message="#{msg.ERROR_USER_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" />
- <h:form id="form-admin-user-unlock" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'LOCKED'}">
+ <h:form rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'LOCKED'}">
<h:panelGroup layout="block">
<div class="table-header">
<h:outputFormat value="#{msg.ADMIN_UNLOCK_USER_TITLE}">
/>
<p:commandButton
- process="@form"
type="submit"
action="#{adminUserController.unlockUserAccount()}"
value="#{msg.BUTTON_ADMIN_UNLOCK_USER_ACCOUNT}"
<ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name') and featureController.isFeatureEnabled('user_password_recovery')}">
<div id="user_lost_password_content">
- <h:form id="form_lost_password">
+ <h:form>
<h:panelGroup styleClass="table" layout="block">
<div class="table-header">
<h:outputText value="#{msg.GUEST_LOST_PASSWORD_TITLE}" />
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_CONTINUE_STEP_2}"
action="#{passwordRecoveryController.doLostPasswordStep2()}"
<ui:define name="content">
<core:outputMessageBox panelGroupId="errorUserResendLinkDisabled" message="#{msg.ERROR_GUEST_USER_RESEND_LINK_DISABLED}" messageStyleClass="alert-danger" rendered="#{not featureController.isFeatureEnabled('user_resend_confirmation_link')}" />
- <h:form id="form_resend_link" rendered="#{featureController.isFeatureEnabled('user_resend_confirmation_link')}">
+ <h:form rendered="#{featureController.isFeatureEnabled('user_resend_confirmation_link')}">
<h:panelGroup styleClass="table" layout="block">
<div class="table-header">
<h:outputText value="#{msg.GUEST_RESEND_LINK_TITLE}" />
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_RESEND_CONFIRMATION_LINK}"
action="#{userResendConfirmationController.doResendLink()}"
</ui:define>
<ui:define name="content">
- <h:form id="form_user_logout" rendered="#{userLoginController.isUserLoggedIn()}">
+ <h:form rendered="#{userLoginController.isUserLoggedIn()}">
<h:panelGroup styleClass="table" layout="block">
<div class="table-header">
<h:outputText value="#{msg.LOGIN_USER_LOGOUT_TITLE}" />
</h:panelGroup>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_USER_LOGOUT}"
action="#{userLoginController.doUserLogout()}"
<h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" />
</div>
- <h:form id="form_user_change_email_address">
+ <h:form>
<fieldset class="fieldset">
<legend title="#{msg.LOGIN_CHANGE_EMAIL_LEGEND_TITLE}">
<h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_LEGEND}" />
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_CHANGE_EMAIL_ADDRESS}"
action="#{userEmailChangeController.doUserChangeEmailAddress()}"
</ui:fragment>
<ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
- <h:form id="form_user_change_password">
+ <h:form>
<h:panelGroup styleClass="table" layout="block" rendered="#{featureController.isFeatureEnabled('change_user_password')}">
<div class="table-header">
<h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_TITLE}" />
/>
<p:commandButton
- process="@form"
type="submit"
value="#{msg.BUTTON_USER_CHANGE_PASSWORD}"
action="#{userPasswordController.doChangePassword()}"
<h:outputText value="#{msg.LOGIN_CHANGE_PERSONAL_DATA_TITLE}" />
</div>
- <h:form id="form_login_change_personal">
+ <h:form>
<ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
<ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
/>
<p:commandButton
- process="@form"
- type="submit"
value="#{msg.BUTTON_CHANGE_PERSONAL_DATA}"
action="#{userController.doChangePersonalData()}"
/>