- got rid of admin_form_basic_data.tpl, now moved back to original view, I guess
I will do that for all forms, which would lead to "duplicate" forms elements
butter with no targetController which was never resolvable anyway.
- added showEmailAddress boolean flag to many renderFoo() methods to whether
show email address which is mostly not wanted in selection boxes ...
- added companyRoadNumber to basic-data backing bean and proper forms/list view
- in converters/validators now the FOO_LIST_CONTROLLER static instance shall
always be initialized directly before the try{} block
Signed-off-by: Roland Häder <roland@mxchange.org>
*/
private String companyName;
+ /**
+ * Company's road number
+ */
+ private String companyRoadNumber;
+
/**
* Company short name
*/
basicData.setCompanyFounder(this.getCompanyFounder());
basicData.setCompanyHeadquarterData(this.getCompanyHeadQuarter());
basicData.setCompanyName(this.getCompanyName());
+ basicData.setCompanyRoadNumber(this.getCompanyRoadNumber());
basicData.setCompanyTaxNumber(this.getCompanyTaxNumber());
basicData.setCompanyUserOwner(this.getCompanyUserOwner());
basicData.setCompanyWebsiteUrl(this.getCompanyWebsiteUrl());
// Set logo instance
// @TODO basicData.setCompanyLogo();
- // Generate phone number
- DialableLandLineNumber landLine = new LandLineNumber(this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
- DialableFaxNumber fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
+ // Init varibables
+ DialableLandLineNumber landLine = null;
+ DialableFaxNumber fax = null;
+
+ // Are all 3 fields set?
+ if (this.getLandLineAreaCode() != null && this.getLandLineCountry() != null && this.getLandLineNumber() != null) {
+ // Initialize land number number instance
+ landLine = new LandLineNumber(this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
+ }
+
+ // Are all 3 fields set?
+ if (this.getFaxAreaCode() != null && this.getFaxCountry() != null && this.getFaxNumber() != null) {
+ // Initialzie fax number instance
+ fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
+ }
// Don't set null or wrong references
if ((landLine instanceof DialableLandLineNumber) && (landLine.getPhoneCountry() instanceof Country) && (this.getLandLineAreaCode() != null) && (this.getLandLineNumber() != null) && (this.getLandLineAreaCode() > 0) && (this.getLandLineNumber() > 0)) {
basicData.setCompanyFaxNumber(fax);
}
+ // Init variable
+ final BasicData updatedBasicData;
+
// Now try to send to EJB and get an updated version back
try {
// Try it
- final BasicData updatedBasicData = this.adminBasicCompanyDataBean.addBusinessBasicData(basicData);
-
- // Fire event
- this.businessDataAddedEvent.fire(new AdminAddedBusinessBasicDataEvent(updatedBasicData));
+ updatedBasicData = this.adminBasicCompanyDataBean.addBusinessBasicData(basicData);
} catch (final BasicDataAlreadyAddedException e) {
// Does already exist
throw new FacesException(e);
}
+
+ // Fire event
+ this.businessDataAddedEvent.fire(new AdminAddedBusinessBasicDataEvent(updatedBasicData));
}
/**
this.companyName = companyName;
}
+ /**
+ * Getter for company's road number
+ * <p>
+ * @return Company's road number
+ */
+ public String getCompanyRoadNumber () {
+ return this.companyRoadNumber;
+ }
+
+ /**
+ * Setter for company's road number
+ * <p>
+ * @param companyRoadNumber Company's road number
+ */
+ public void setCompanyRoadNumber (final String companyRoadNumber) {
+ this.companyRoadNumber = companyRoadNumber;
+ }
+
/**
* Getter for company short name
* <p>
return isFound;
}
+ @Override
+ public boolean isCompanyRoadNumberUsed (final String companyRoadNumber) {
+ // Validate parameter
+ if (null == companyRoadNumber) {
+ // Throw NPE
+ throw new NullPointerException("companyRoadNumber is null"); //NOI18N
+ } else if (companyRoadNumber.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("companyRoadNumber 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.getCompanyRoadNumber(), companyRoadNumber)) {
+ // Found it
+ isFound = true;
+ break;
+ }
+ }
+
+ // Return flag
+ return isFound;
+ }
+
@Override
public Boolean isCompanyShortNameUsed (final String companyShortName) {
// Validate parameter
*/
public interface FinancialsBasicDataListWebViewController extends Serializable {
+ /**
+ * Checks whether given company's road number is already used.
+ * <p>
+ * @param companyRoadNumber Company's road number
+ * <p>
+ * @return Whether it is already in use
+ */
+ boolean isCompanyRoadNumberUsed (final String companyRoadNumber);
+
/**
* Retrieves a single business data entity for given id number or throws a
* proper exception if not found.
/**
* Renders data of basic company data
* <p>
- * @param basicData Basic company data instance
- * @param useShortName Whether to use short name or long name of company
+ * @param basicData Basic company data instance
+ * @param useShortName Whether to use short name or long name of company
+ * @param showEmailAddress Whether render email address
* <p>
* @return Basic company data as string
*/
- public String renderBasicData (final BasicData basicData, final boolean useShortName) {
+ public String renderBasicData (final BasicData basicData, final boolean useShortName, final boolean showEmailAddress) {
// Default is empty string, so let's get started
final StringBuilder sb = new StringBuilder(30);
}
// Is email address set?
- if (basicData.getCompanyEmailAddress() != null) {
+ if (showEmailAddress && basicData.getCompanyEmailAddress() != null) {
// Add it
sb.append(", ").append(basicData.getCompanyEmailAddress()); //NOI18N
}
* Returns the branch office's full address. If null is provided, an empty
* string is returned.
* <p>
- * @param branchOffice Branch office instance
+ * @param branchOffice Branch office instance
+ * @param showEmailAddress Whether render email address
* <p>
* @return Branch office's address
*/
- public String renderBranchOffice (final BranchOffice branchOffice) {
+ public String renderBranchOffice (final BranchOffice branchOffice, final boolean showEmailAddress) {
// Default is empty string, so let's get started
final StringBuilder sb = new StringBuilder(30);
}
// Yes, then append all data
- sb.append(this.renderBasicData(branchOffice.getBranchCompany(), true));
+ sb.append(this.renderBasicData(branchOffice.getBranchCompany(), true, showEmailAddress));
sb.append(", "); //NOI18N
sb.append(branchOffice.getBranchStreet());
sb.append(" "); //NOI18N
* Returns the department's name and name of assigned company. If null is
* provided, an empty string is returned.
* <p>
- * @param department Department instance
+ * @param department Department instance
+ * @param showEmailAddress Whether to render email address
* <p>
* @return Department's full name
*/
- public String renderDepartment (final Department department) {
+ public String renderDepartment (final Department department, final boolean showEmailAddress) {
// Default is empty string, so let's get started
final StringBuilder sb = new StringBuilder(10);
// Then create name
sb.append(this.getMessageFromBundle(department.getDepartmentI18nKey()));
sb.append(" ("); //NOI18N
- sb.append(this.renderBasicData(department.getDepartmentCompany(), true));
+ sb.append(this.renderBasicData(department.getDepartmentCompany(), true, showEmailAddress));
sb.append(")"); //NOI18N
}
* Returns the employee's number, personal title, family name and name if
* available. If null is provided, an empty string is returned.
* <p>
- * @param employee Employable instance
+ * @param employee Employable instance
+ * @param showEmailAddress Whether to show email address of employee
* <p>
* @return A string representing an employee
*/
- public String renderEmployee (final Employable employee) {
+ public String renderEmployee (final Employable employee, final boolean showEmailAddress) {
// Default is empty string, so let's get started
final StringBuilder sb = new StringBuilder(20);
}
// Add department name
- sb.append(this.renderDepartment(employee.getEmployeeDepartment()));
+ sb.append(this.renderDepartment(employee.getEmployeeDepartment(), showEmailAddress));
// Only add braces when employee number is given
if (employee.getEmployeeNumber() != null || employee.getEmployeePersonalData() instanceof Contact) {
import javax.faces.FacesException;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
-import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jusercore.events.user.unlocked.AdminUnlockedUserEvent;
import org.mxchange.jusercore.events.user.unlocked.ObservableAdminUnlockedUserEvent;
import org.mxchange.jusercore.events.user.update.post.AdminPostUserDataUpdatedEvent;
+import org.mxchange.jusercore.events.user.update.post.ObservableAdminPostUserDataUpdatedEvent;
import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException;
import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException;
import org.mxchange.jusercore.exceptions.UserNotFoundException;
import org.mxchange.juserlogincore.events.registration.ObservableUserRegisteredEvent;
import org.mxchange.juserlogincore.exceptions.UserPasswordRepeatMismatchException;
import org.mxchange.juserlogincore.login.UserLoginUtils;
-import org.mxchange.jusercore.events.user.update.post.ObservableAdminPostUserDataUpdatedEvent;
/**
* A user bean (controller)
return;
}
+ // Init variable
+ final User updatedUser;
+
try {
// Now, that all is set, call EJB
if (this.getContact() instanceof Contact) {
// Link contact with this user
- final User updatedUser = this.adminUserBean.linkUser(newUser);
-
- // Fire event
- this.userLinkedEvent.fire(new AdminLinkedUserEvent(updatedUser));
+ updatedUser = this.adminUserBean.linkUser(newUser);
} else {
// Add new user
- final User updatedUser = this.adminUserBean.addUser(newUser);
-
- // Fire event
- this.addedUserEvent.fire(new AdminAddedUserEvent(updatedUser));
+ updatedUser = this.adminUserBean.addUser(newUser);
}
} catch (final UserNameAlreadyRegisteredException | EmailAddressAlreadyRegisteredException ex) {
// Throw again
throw new FacesException(ex);
}
+ // Now, that all is set, call EJB
+ if (this.getContact() instanceof Contact) {
+ // Fire event
+ this.userLinkedEvent.fire(new AdminLinkedUserEvent(updatedUser));
+ } else {
+ // Fire event
+ this.addedUserEvent.fire(new AdminAddedUserEvent(updatedUser));
+ }
// Clear helper
this.setContact(null);
// Set it in user
user.setUserEncryptedPassword(encryptedPassword);
+ // Init variable
+ final PasswordHistory passwordHistory;
+
try {
// Get base URL
final String baseUrl = FacesUtils.generateBaseUrl();
// All is set, then update password
- PasswordHistory passwordHistory = this.userBean.updateUserPassword(user, baseUrl);
-
- // Fire event
- this.userUpdatedPasswordEvent.fire(new UpdatedUserPasswordEvent(passwordHistory, this.getUserPassword()));
+ passwordHistory = this.userBean.updateUserPassword(user, baseUrl);
} catch (final UserNotFoundException | UserStatusUnconfirmedException | UserStatusLockedException ex) {
// Clear bean
this.clear();
throw new FacesException(ex);
}
+ // Fire event
+ this.userUpdatedPasswordEvent.fire(new UpdatedUserPasswordEvent(passwordHistory, this.getUserPassword()));
+
// Clear bean
this.clear();
user.setUserConfirmKey(confirmKey);
}
+ // Init variable
+ final User registeredUser;
+
try {
// Get base URL
final String baseUrl = FacesUtils.generateBaseUrl();
// Call bean
- final User registeredUser = this.registerBean.registerUser(user, baseUrl, randomPassword);
+ registeredUser = this.registerBean.registerUser(user, baseUrl, randomPassword);
// The id number should be set
assert (registeredUser.getUserId() instanceof Long) : "registeredUser.userId is null after registerUser() was called."; //NOI18N
-
- // Fire event
- this.userRegisteredEvent.fire(new UserRegisteredEvent(registeredUser));
-
- // All fine, redirect to proper page
- return "user_register_done"; //NOI18N
} catch (final UserNameAlreadyRegisteredException | EmailAddressAlreadyRegisteredException ex) {
// Continue to throw
throw new FacesException(ex);
}
+
+ // Fire event
+ this.userRegisteredEvent.fire(new UserRegisteredEvent(registeredUser));
+
+ // All fine, redirect to proper page
+ return "user_register_done"; //NOI18N
}
/**
@Override
public BasicData getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
- // Is the instance there?
- if (null == BASIC_DATA_LIST_CONTROLLER) {
- // Get bean from CDI directly
- BASIC_DATA_LIST_CONTROLLER = CDI.current().select(FinancialsBasicDataListWebViewBean.class).get();
- }
-
// 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
BasicData basicData = null;
+ // Is the instance there?
+ if (null == BASIC_DATA_LIST_CONTROLLER) {
+ // Get bean from CDI directly
+ BASIC_DATA_LIST_CONTROLLER = CDI.current().select(FinancialsBasicDataListWebViewBean.class).get();
+ }
+
try {
// Try to parse the value as long
final Long basicDataId = Long.valueOf(submittedValue);
@Override
public BranchOffice getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
- // Is the instance there?
- if (null == BRANCH_OFFICE_LIST_CONTROLLER) {
- // Get bean from CDI directly
- BRANCH_OFFICE_LIST_CONTROLLER = CDI.current().select(FinancialsBranchOfficeListWebViewBean.class).get();
- }
-
// 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;
+ // Is the instance there?
+ if (null == BRANCH_OFFICE_LIST_CONTROLLER) {
+ // Get bean from CDI directly
+ BRANCH_OFFICE_LIST_CONTROLLER = CDI.current().select(FinancialsBranchOfficeListWebViewBean.class).get();
+ }
+
try {
// Try to parse the value as long
final Long branchOfficeId = Long.valueOf(submittedValue);
public Department getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
// 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
Department companyDepartment = null;
+ // Is the instance there?
+ if (null == DEPARTMENT_LIST_CONTROLLER) {
+ // Get bean from CDI directly
+ DEPARTMENT_LIST_CONTROLLER = CDI.current().select(FinancialsDepartmentListWebViewBean.class).get();
+ }
+
try {
// Try to parse the value as long
final Long departmentId = Long.valueOf(submittedValue);
- // Is the instance there?
- if (null == DEPARTMENT_LIST_CONTROLLER) {
- // Get bean from CDI directly
- DEPARTMENT_LIST_CONTROLLER = CDI.current().select(FinancialsDepartmentListWebViewBean.class).get();
- }
-
// Try to get user instance from it
companyDepartment = DEPARTMENT_LIST_CONTROLLER.findDepartmentById(departmentId);
} catch (final NumberFormatException ex) {
// Init instance
Employable companyEmployee = null;
+ // Is the instance there?
+ if (null == EMPLOYEE_LIST_CONTROLLER) {
+ // Get bean from CDI directly
+ EMPLOYEE_LIST_CONTROLLER = CDI.current().select(FinancialsEmployeeListWebViewBean.class).get();
+ }
+
try {
// Try to parse the value as long
final Long employeeId = Long.valueOf(submittedValue);
- // Is the instance there?
- if (null == EMPLOYEE_LIST_CONTROLLER) {
- // Get bean from CDI directly
- EMPLOYEE_LIST_CONTROLLER = CDI.current().select(FinancialsEmployeeListWebViewBean.class).get();
- }
-
// Try to get user instance from it
companyEmployee = EMPLOYEE_LIST_CONTROLLER.findEmployeeById(employeeId);
} catch (final NumberFormatException ex) {
@Override
public Headquarter getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
+ // Is the value null or empty?
+ if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
+ // Return null
+ return null;
+ }
+
// Init instance
Headquarter headquarter = null;
+ // Is the instance there?
+ if (null == HEADQUARTER_LIST_CONTROLLER) {
+ // Set it now
+ HEADQUARTER_LIST_CONTROLLER = CDI.current().select(FinancialsHeadquarterListWebViewBean.class).get();
+ }
+
try {
// Try to parse the value as long
final Long headquarterId = Long.valueOf(submittedValue);
- // Is the instance there?
- if (null == HEADQUARTER_LIST_CONTROLLER) {
- // Set it now
- HEADQUARTER_LIST_CONTROLLER = CDI.current().select(FinancialsHeadquarterListWebViewBean.class).get();
- }
-
// Try to get user instance from it
headquarter = HEADQUARTER_LIST_CONTROLLER.findHeadquarterById(headquarterId);
} catch (final NumberFormatException ex) {
public OpeningTime getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
// 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
OpeningTime openingTime = null;
+ // Is the instance there?
+ if (null == OPENING_TIME_LIST_CONTROLLER) {
+ // Get bean from CDI directly
+ OPENING_TIME_LIST_CONTROLLER = CDI.current().select(FinancialsOpeningTimeListWebViewBean.class).get();
+ }
+
try {
// Try to parse the value as long
final Long openingTimeId = Long.valueOf(submittedValue);
- // Is the instance there?
- if (null == OPENING_TIME_LIST_CONTROLLER) {
- // Get bean from CDI directly
- OPENING_TIME_LIST_CONTROLLER = CDI.current().select(FinancialsOpeningTimeListWebViewBean.class).get();
- }
-
// Try to get user instance from it
openingTime = OPENING_TIME_LIST_CONTROLLER.findOpeningTimeById(openingTimeId);
} catch (final NumberFormatException ex) {
@Override
public Contact getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
- // Is the instance there?
- if (null == CONTACT_LIST_CONTROLLER) {
- // Get bean from CDI directly
- CONTACT_LIST_CONTROLLER = CDI.current().select(FinancialsContactListWebViewBean.class).get();
- }
-
// 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
Contact contact = null;
+ // Is the instance there?
+ if (null == CONTACT_LIST_CONTROLLER) {
+ // Get bean from CDI directly
+ CONTACT_LIST_CONTROLLER = CDI.current().select(FinancialsContactListWebViewBean.class).get();
+ }
+
try {
// Try to parse the value as long
final Long contactId = Long.valueOf(submittedValue);
public Country getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
// 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 value
Country country = null;
+ // Is the instance there?
+ if (null == COUNTRY_LIST_CONTROLLER) {
+ // Get bean from CDI directly
+ COUNTRY_LIST_CONTROLLER = CDI.current().select(FinancialsCountryListWebViewBean.class).get();
+ }
+
// Try this better
try {
// Convert it to long
final Long countryId = Long.parseLong(submittedValue);
- // Is the instance there?
- if (null == COUNTRY_LIST_CONTROLLER) {
- // Get bean from CDI directly
- COUNTRY_LIST_CONTROLLER = CDI.current().select(FinancialsCountryListWebViewBean.class).get();
- }
-
// Try to find it
country = COUNTRY_LIST_CONTROLLER.findCountryById(countryId);
} catch (final NumberFormatException ex) {
// Init instance
DialableFaxNumber faxNumber = null;
+ // Is the instance there?
+ if (null == PHONE_LIST_CONTROLLER) {
+ // Get bean from CDI directly
+ PHONE_LIST_CONTROLLER = CDI.current().select(FinancialsPhoneListWebViewBean.class).get();
+ }
+
try {
// Try to parse the value as long
final Long faxNumberId = Long.valueOf(submittedValue);
- // Is the instance there?
- if (null == PHONE_LIST_CONTROLLER) {
- // Get bean from CDI directly
- PHONE_LIST_CONTROLLER = CDI.current().select(FinancialsPhoneListWebViewBean.class).get();
- }
-
// Try to get mobile instance from it
faxNumber = PHONE_LIST_CONTROLLER.findFaxNumberById(faxNumberId);
} catch (final NumberFormatException ex) {
// Init instance
DialableLandLineNumber landLineNumber = null;
+ // Is the instance there?
+ if (null == PHONE_LIST_CONTROLLER) {
+ // Get bean from CDI directly
+ PHONE_LIST_CONTROLLER = CDI.current().select(FinancialsPhoneListWebViewBean.class).get();
+ }
+
try {
// Try to parse the value as long
final Long landLineNumberId = Long.valueOf(submittedValue);
- // Is the instance there?
- if (null == PHONE_LIST_CONTROLLER) {
- // Get bean from CDI directly
- PHONE_LIST_CONTROLLER = CDI.current().select(FinancialsPhoneListWebViewBean.class).get();
- }
-
// Try to get mobile instance from it
landLineNumber = PHONE_LIST_CONTROLLER.findLandLineNumberById(landLineNumberId);
} catch (final NumberFormatException ex) {
// Init instance
DialableMobileNumber mobileNumber = null;
+ // Is the instance there?
+ if (null == MOBILE_LIST_CONTROLLER) {
+ // Get bean from CDI directly
+ MOBILE_LIST_CONTROLLER = CDI.current().select(FinancialsMobileListWebViewBean.class).get();
+ }
+
try {
// Try to parse the value as long
final Long mobileNumberId = Long.valueOf(submittedValue);
- // Is the instance there?
- if (null == MOBILE_LIST_CONTROLLER) {
- // Get bean from CDI directly
- MOBILE_LIST_CONTROLLER = CDI.current().select(FinancialsMobileListWebViewBean.class).get();
- }
-
// Try to get mobile instance from it
mobileNumber = MOBILE_LIST_CONTROLLER.findMobileNumberById(mobileNumberId);
} catch (final NumberFormatException ex) {
// Init value
MobileProvider mobileProvider = null;
+ // Is the instance there?
+ if (null == MOBILE_PROVIDER_LIST_CONTROLLER) {
+ // Get bean from CDI directly
+ MOBILE_PROVIDER_LIST_CONTROLLER = CDI.current().select(FinancialsMobileProviderListWebViewBean.class).get();
+ }
+
// Try this better
try {
// Convert it to long
final Long providerId = Long.parseLong(submittedValue);
- // Is the instance there?
- if (null == MOBILE_PROVIDER_LIST_CONTROLLER) {
- // Get bean from CDI directly
- MOBILE_PROVIDER_LIST_CONTROLLER = CDI.current().select(FinancialsMobileProviderListWebViewBean.class).get();
- }
-
// Lookup of mobile provider
mobileProvider = MOBILE_PROVIDER_LIST_CONTROLLER.findMobileProviderById(providerId);
} catch (final NumberFormatException ex) {
import javax.faces.convert.Converter;
import javax.faces.convert.ConverterException;
import javax.faces.convert.FacesConverter;
-import org.mxchange.jfinancials.beans.user.list.FinancialsUserListWebViewController;
import org.mxchange.jfinancials.beans.user.list.FinancialsUserListWebViewBean;
+import org.mxchange.jfinancials.beans.user.list.FinancialsUserListWebViewController;
import org.mxchange.jusercore.exceptions.UserNotFoundException;
import org.mxchange.jusercore.model.user.User;
@Override
public User getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
- // Is the instance there?
- if (null == USER_LIST_CONTROLLER) {
- // Get bean from CDI directly
- USER_LIST_CONTROLLER = CDI.current().select(FinancialsUserListWebViewBean.class).get();
- }
-
// Is the value null or empty?
if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
// Warning message
// Init instance
User user = null;
+ // Is the instance there?
+ if (null == USER_LIST_CONTROLLER) {
+ // Get bean from CDI directly
+ USER_LIST_CONTROLLER = CDI.current().select(FinancialsUserListWebViewBean.class).get();
+ }
+
try {
// Try to parse the value as long
final Long userId = Long.valueOf(submittedValue);
ADMIN_BASIC_DATA_LEGEND=Basisdaten f\u00fcr gesch\u00e4ftlichen Kontakt:
ADMIN_BASIC_DATA_LEGEND_TITLE=Geben Sie die Basisdaten f\u00fcr einen gesch\u00e4ftlichen Kontakt 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:
BUTTON_ADMIN_ADD_BASIC_DATA=Basisdaten hinzuf\u00fcgen
ERROR_GUEST_REGISTRATION_IN_INDEX_ENABLED=Fehler: Falscher Aufruf der Anmeldeseite, da die Eingangsseite als Anmeldeseite fungiert.
ADMIN_DEPARTMENT_DETAILS_HEADER=Daten der Abteilung {0} (Id {1}):
ADMIN_HEADQUARTER_DETAILS_HEADER=Haupstelle von {0} (Id {1})):
ERROR_PARAMETER_CONFIRM_KEY_IS_NOT_SET=Fehler: Parameter "confirmationKey" ist nicht gesetzt.
+ROAD_NUMBER_HEADER=Betriebsnummer:
+ADMIN_BASIC_DATA_COMPANY_ROAD_NUMBER=Betriebsnummer:
+BASIC_DATA_COMPANY_ROAD_NUMBER_MISMATCHES_PATTERN=Die Betriebsnummer stimmt nicht mit dem regul\u00e4ren Ausruck AA BB 12345 \u00fcberein.
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_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
ERROR_GUEST_REGISTRATION_IN_INDEX_ENABLED=Error: Wrong request on registration page as the index page serves as registration page.
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=Company's short name:
ADMIN_BASIC_DATA_COMPANY_SHORT_NAME_HEADER=Short name:
AVAILABLE_HEADER=Available:
ADMIN_MANUFACTURER_HEADER=Manufacturer:
ADMIN_HEADQUARTER_DETAILS_HEADER=Headquarter of {0} (Id {1})):
CHANGE=Change?
ERROR_PARAMETER_CONFIRM_KEY_IS_NOT_SET=Error: Parameter "confirmKey" is required.
+ROAD_NUMBER_HEADER=Road number:
+ADMIN_BASIC_DATA_COMPANY_ROAD_NUMBER=Road number:
+BASIC_DATA_COMPANY_ROAD_NUMBER_MISMATCHES_PATTERN=Company's road number does not match pattern AA BB 12345.
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-@TODO: title="#{msg.ADMIN_BASIC_DATA_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:h="http://xmlns.jcp.org/jsf/html"
- xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
- xmlns:p="http://primefaces.org/ui"
- >
-
- <h:panelGroup styleClass="para" layout="block">
- <p:fieldset legend="#{msg.ADMIN_BASIC_DATA_LEGEND}">
- <p:panelGrid
- columns="2"
- 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="255"
- >
- <f:validator validatorId="BasicDataCompanyNameValidator" />
- <f:attribute name="checkExisting" value="false" />
- </p:inputText>
-
- <p:outputLabel for="companyEmailAddress" value="#{msg.ADMIN_BASIC_DATA_COMPANY_EMAIL_ADDRESS}" />
- <p:inputText
- id="companyEmailAddress"
- size="40"
- maxlength="255"
- value="#{adminBasicCompanyDataController.companyEmailAddress}"
- validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}"
- >
- <validator:basicDataEmailAddressValidator allowEmptyRequiredData="true" />
- </p:inputText>
-
- <p:outputLabel for="companyLogo" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_LOGO}" />
- <core:outputMessageBox
- panelGroupId="companyLogo"
- message="#{msg.ADMIN_FEATURE_UNFINISHED_WARNING}"
- boxStyleClass="message-full"
- messageStyleClass="alert-warning"
- />
-
- <p:outputLabel for="companyTaxNumber" value="#{msg.ADMIN_BASIC_DATA_COMPANY_TAX_NUMBER}" />
- <p:inputText
- id="companyTaxNumber"
- size="30"
- maxlength="200"
- value="#{adminBasicCompanyDataController.companyTaxNumber}"
- />
-
- <p:outputLabel for="companyWebsiteUrl" value="#{msg.ADMIN_BASIC_DATA_COMPANY_WEBSITE_URL}" />
- <p:inputText
- id="companyWebsiteUrl"
- size="30"
- maxlength="200"
- value="#{adminBasicCompanyDataController.companyWebsiteUrl}"
- validatorMessage="#{msg.URL_NOT_MATCHING_REGULAR_EXPRESSION}"
- >
- <validator:urlValidator allowEmptyRequiredData="true" />
- </p:inputText>
-
- <p:outputLabel for="companyUserOwner" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_USER_OWNER}" />
- <p:selectOneMenu
- id="companyUserOwner"
- value="#{adminBasicCompanyDataController.companyUserOwner}"
- filter="true"
- filterMatchMode="contains"
- >
-
- <f:converter converterId="UserConverter" />
-
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-
- <f:selectItems
- value="#{userListController.allUsers}"
- var="companyUserOwner"
- itemValue="#{companyUserOwner}"
- itemLabel="#{beanHelper.renderContact(companyUserOwner.userContact)} (#{companyUserOwner.userName})"
- />
- </p:selectOneMenu>
-
- <p:outputLabel for="companyContactEmployee" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_CONTACT_EMPLOYEE}" />
- <p:selectOneMenu
- id="companyContactEmployee"
- value="#{adminBasicCompanyDataController.companyContactEmployee}"
- filter="true"
- filterMatchMode="contains"
- >
-
- <f:converter converterId="EmployeeConverter" />
-
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-
- <f:selectItems
- value="#{employeeListController.allEmployees}"
- var="companyEmployee"
- itemValue="#{companyEmployee}"
- itemLabel="#{beanHelper.renderEmployee(companyEmployee)}"
- />
- </p:selectOneMenu>
-
- <p:outputLabel for="companyFounder" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_FOUNDER}" />
- <p:selectOneMenu
- id="companyFounder"
- value="#{adminBasicCompanyDataController.companyFounder}"
- filter="true"
- filterMatchMode="contains"
- >
-
- <f:converter converterId="EmployeeConverter" />
-
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-
- <f:selectItems
- value="#{employeeListController.allEmployees}"
- var="companyEmployee"
- itemValue="#{companyEmployee}"
- itemLabel="#{beanHelper.renderEmployee(companyEmployee)}"
- />
- </p:selectOneMenu>
-
- <p:outputLabel for="companyHeadquarter" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_HEADQUARTER}" />
- <p:selectOneMenu
- id="companyHeadquarter"
- value="#{adminBasicCompanyDataController.companyHeadQuarter}"
- filter="true"
- filterMatchMode="contains"
- >
-
- <f:converter converterId="HeadquarterConverter" />
-
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-
- <f:selectItems
- value="#{headquarterListController.allHeadquarters}"
- var="headquarter"
- itemValue="#{headquarter}"
- itemLabel="#{beanHelper.renderHeadquarter(headquarter)}"
- />
- </p:selectOneMenu>
-
- <p:outputLabel for="landLineCountry" value="#{msg.ADMIN_BASIC_DATA_PHONE_NUMBER}" />
- <core:inputLandLineNumberPanelGrid targetController="#{adminBasicCompanyDataController}" />
-
- <p:outputLabel for="faxCountry" value="#{msg.ADMIN_BASIC_DATA_FAX_NUMBER}" />
- <core:inputFaxNumberPanelGrid targetController="#{adminBasicCompanyDataController}" />
-
- <p:outputLabel for="companyComments" value="#{msg.ADMIN_BASIC_DATA_COMPANY_COMMENTS}" />
- <p:inputTextarea
- id="companyComments"
- value="#{adminBasicCompanyDataController.companyComments}"
- rows="7"
- cols="25"
- />
- </p:panelGrid>
- </p:fieldset>
- </h:panelGroup>
-</ui:composition>
value="#{basicDataListController.allBasicData}"
var="basicData"
itemValue="#{basicData}"
- itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+ itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
/>
</p:selectOneMenu>
value="#{employeeListController.allEmployees}"
var="companyEmployee"
itemValue="#{companyEmployee}"
- itemLabel="#{beanHelper.renderEmployee(companyEmployee)}"
+ itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
/>
</p:selectOneMenu>
value="#{employeeListController.allEmployees}"
var="companyEmployee"
itemValue="#{companyEmployee}"
- itemLabel="#{beanHelper.renderEmployee(companyEmployee)}"
+ itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
/>
</p:selectOneMenu>
value="#{basicDataListController.allBasicData}"
var="basicData"
itemValue="#{basicData}"
- itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+ itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
/>
</p:selectOneMenu>
value="#{branchOfficeListController.allBranchOffices}"
var="branchOffice"
itemValue="#{branchOffice}"
- itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
+ itemLabel="#{beanHelper.renderBranchOffice(branchOffice, false)}"
/>
</p:selectOneMenu>
value="#{employeeListController.allEmployees}"
var="employee"
itemValue="#{employee}"
- itemLabel="#{beanHelper.renderEmployee(employee)}"
+ itemLabel="#{beanHelper.renderEmployee(employee, false)}"
/>
</p:selectOneMenu>
value="#{basicDataListController.allBasicData}"
var="basicData"
itemValue="#{basicData}"
- itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+ itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
/>
</p:selectOneMenu>
value="#{branchOfficeListController.allBranchOffices}"
var="branchOffice"
itemValue="#{branchOffice}"
- itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
+ itemLabel="#{beanHelper.renderBranchOffice(branchOffice, false)}"
/>
</p:selectOneMenu>
value="#{departmentListController.allDepartments}"
var="department"
itemValue="#{department}"
- itemLabel="#{beanHelper.renderDepartment(department)}"
+ itemLabel="#{beanHelper.renderDepartment(department, false)}"
/>
</p:selectOneMenu>
value="#{employeeListController.allEmployees}"
var="companyEmployee"
itemValue="#{companyEmployee}"
- itemLabel="#{beanHelper.renderEmployee(companyEmployee)}"
+ itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
/>
</p:selectOneMenu>
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui"
+ xmlns:core="http://mxchange.org/jsf/core/widgets"
+ xmlns:validator="http://mxchange.org/jsf/core/validators"
>
<ui:define name="document_admin_title">
value="#{employeeListController.allEmployees}"
var="employee"
itemValue="#{employee}"
- itemLabel="#{beanHelper.renderEmployee(employee)}"
+ itemLabel="#{beanHelper.renderEmployee(employee, true)}"
/>
</p:selectCheckboxMenu>
</f:facet>
<p:link
outcome="admin_show_employee"
- value="#{beanHelper.renderEmployee(basicData.companyContactEmployee)}"
+ value="#{beanHelper.renderEmployee(basicData.companyContactEmployee, true)}"
title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_CONTACT_PERSON_TITLE}"
rendered="#{not empty basicData.companyContactEmployee}"
>
value="#{employeeListController.allEmployees}"
var="employee"
itemValue="#{employee}"
- itemLabel="#{beanHelper.renderEmployee(employee)}"
+ itemLabel="#{beanHelper.renderEmployee(employee, false)}"
/>
</p:selectCheckboxMenu>
</f:facet>
<p:link
outcome="admin_show_employee"
- value="#{beanHelper.renderEmployee(basicData.companyFounder)}"
+ value="#{beanHelper.renderEmployee(basicData.companyFounder, false)}"
title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_COMPANY_FOUNDER_TITLE}"
rendered="#{not empty basicData.companyFounder}"
>
<h:outputText value="#{msg.ADMIN_ADD_BASIC_DATA_MINIMUM_DATA}" />
</h:panelGroup>
- <ui:include src="/WEB-INF/templates/admin/basic_data/admin_form_basic_data.tpl" />
+ <h:panelGroup styleClass="para" layout="block">
+ <p:fieldset legend="#{msg.ADMIN_BASIC_DATA_LEGEND}">
+ <p:panelGrid
+ columns="2"
+ 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="255"
+ >
+ <f:validator validatorId="BasicDataCompanyNameValidator" />
+ <f:attribute name="checkExisting" value="false" />
+ </p:inputText>
+
+ <p:outputLabel for="companyEmailAddress" value="#{msg.ADMIN_BASIC_DATA_COMPANY_EMAIL_ADDRESS}" />
+ <p:inputText
+ id="companyEmailAddress"
+ size="40"
+ maxlength="255"
+ value="#{adminBasicCompanyDataController.companyEmailAddress}"
+ validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}"
+ >
+ <validator:basicDataEmailAddressValidator allowEmptyRequiredData="true" />
+ </p:inputText>
+
+ <p:outputLabel for="companyLogo" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_LOGO}" />
+ <core:outputMessageBox
+ panelGroupId="companyLogo"
+ message="#{msg.ADMIN_FEATURE_UNFINISHED_WARNING}"
+ boxStyleClass="message-full"
+ messageStyleClass="alert-warning"
+ />
+
+ <p:outputLabel for="companyRoadNumber" value="#{msg.ADMIN_BASIC_DATA_COMPANY_ROAD_NUMBER}" />
+ <p:inputText
+ id="companyRoadNumber"
+ size="10"
+ maxlength="10"
+ value="#{adminBasicCompanyDataController.companyRoadNumber}"
+ onblur="value = value.toUpperCase()"
+ >
+ <f:validateRegex
+ pattern="[A-Z]{2} [A-Z]{2} [0-9]{2,5}"
+ />
+ <f:validator validatorId="BasicDataCompanyRoadNumberValidator" />
+ <f:attribute name="checkExisting" value="false" />
+ </p:inputText>
+
+ <p:outputLabel for="companyTaxNumber" value="#{msg.ADMIN_BASIC_DATA_COMPANY_TAX_NUMBER}" />
+ <p:inputText
+ id="companyTaxNumber"
+ size="30"
+ maxlength="200"
+ value="#{adminBasicCompanyDataController.companyTaxNumber}"
+ />
+
+ <p:outputLabel for="companyWebsiteUrl" value="#{msg.ADMIN_BASIC_DATA_COMPANY_WEBSITE_URL}" />
+ <p:inputText
+ id="companyWebsiteUrl"
+ size="30"
+ maxlength="200"
+ value="#{adminBasicCompanyDataController.companyWebsiteUrl}"
+ validatorMessage="#{msg.URL_NOT_MATCHING_REGULAR_EXPRESSION}"
+ >
+ <validator:urlValidator allowEmptyRequiredData="true" />
+ </p:inputText>
+
+ <p:outputLabel for="companyUserOwner" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_USER_OWNER}" />
+ <p:selectOneMenu
+ id="companyUserOwner"
+ value="#{adminBasicCompanyDataController.companyUserOwner}"
+ filter="true"
+ filterMatchMode="contains"
+ >
+
+ <f:converter converterId="UserConverter" />
+
+ <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+
+ <f:selectItems
+ value="#{userListController.allUsers}"
+ var="companyUserOwner"
+ itemValue="#{companyUserOwner}"
+ itemLabel="#{beanHelper.renderContact(companyUserOwner.userContact)} (#{companyUserOwner.userName})"
+ />
+ </p:selectOneMenu>
+
+ <p:outputLabel for="companyContactEmployee" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_CONTACT_EMPLOYEE}" />
+ <p:selectOneMenu
+ id="companyContactEmployee"
+ value="#{adminBasicCompanyDataController.companyContactEmployee}"
+ filter="true"
+ filterMatchMode="contains"
+ >
+
+ <f:converter converterId="EmployeeConverter" />
+
+ <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+
+ <f:selectItems
+ value="#{employeeListController.allEmployees}"
+ var="companyEmployee"
+ itemValue="#{companyEmployee}"
+ itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
+ />
+ </p:selectOneMenu>
+
+ <p:outputLabel for="companyFounder" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_FOUNDER}" />
+ <p:selectOneMenu
+ id="companyFounder"
+ value="#{adminBasicCompanyDataController.companyFounder}"
+ filter="true"
+ filterMatchMode="contains"
+ >
+
+ <f:converter converterId="EmployeeConverter" />
+
+ <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+
+ <f:selectItems
+ value="#{employeeListController.allEmployees}"
+ var="companyEmployee"
+ itemValue="#{companyEmployee}"
+ itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
+ />
+ </p:selectOneMenu>
+
+ <p:outputLabel for="companyHeadquarter" value="#{msg.ADMIN_SELECT_BASIC_DATA_COMPANY_HEADQUARTER}" />
+ <p:selectOneMenu
+ id="companyHeadquarter"
+ value="#{adminBasicCompanyDataController.companyHeadQuarter}"
+ filter="true"
+ filterMatchMode="contains"
+ >
+
+ <f:converter converterId="HeadquarterConverter" />
+
+ <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+
+ <f:selectItems
+ value="#{headquarterListController.allHeadquarters}"
+ var="headquarter"
+ itemValue="#{headquarter}"
+ itemLabel="#{beanHelper.renderHeadquarter(headquarter)}"
+ />
+ </p:selectOneMenu>
+
+ <p:outputLabel for="landLineCountry" value="#{msg.ADMIN_BASIC_DATA_PHONE_NUMBER}" />
+ <core:inputLandLineNumberPanelGrid targetController="#{adminBasicCompanyDataController}" />
+
+ <p:outputLabel for="faxCountry" value="#{msg.ADMIN_BASIC_DATA_FAX_NUMBER}" />
+ <core:inputFaxNumberPanelGrid targetController="#{adminBasicCompanyDataController}" />
+
+ <p:outputLabel for="companyComments" value="#{msg.ADMIN_BASIC_DATA_COMPANY_COMMENTS}" />
+ <p:inputTextarea
+ id="companyComments"
+ value="#{adminBasicCompanyDataController.companyComments}"
+ rows="7"
+ cols="25"
+ />
+ </p:panelGrid>
+ </p:fieldset>
+ </h:panelGroup>
<f:facet name="footer">
<p:panelGrid columns="2" layout="grid">
value="#{basicDataListController.allBasicData}"
var="basicData"
itemValue="#{basicData}"
- itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+ itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
/>
</p:selectCheckboxMenu>
</f:facet>
<p:link
outcome="admin_show_basic_data"
- value="#{beanHelper.renderBasicData(branchOffice.branchCompany, true)}"
+ value="#{beanHelper.renderBasicData(branchOffice.branchCompany, true, false)}"
title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
>
<f:param name="basicDataId" value="#{branchOffice.branchCompany.basicDataId}" />
filterBy="#{branchOffice.branchCity}"
filterMatchMode="contains"
>
- <h:outputText value="#{beanHelper.renderBranchOffice(branchOffice)}" title="#{beanHelper.renderBranchOffice(branchOffice)}" />
+ <h:outputText
+ value="#{beanHelper.renderBranchOffice(branchOffice, false)}"
+ title="#{beanHelper.renderBranchOffice(branchOffice, true)}"
+ />
</p:column>
<p:column
value="#{employeeListController.allEmployees}"
var="employee"
itemValue="#{employee}"
- itemLabel="#{beanHelper.renderEmployee(employee)}"
+ itemLabel="#{beanHelper.renderEmployee(employee, false)}"
/>
</p:selectCheckboxMenu>
</f:facet>
<p:link
outcome="admin_show_employee"
- value="#{beanHelper.renderEmployee(branchOffice.branchContactEmployee)}"
+ value="#{beanHelper.renderEmployee(branchOffice.branchContactEmployee, false)}"
title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}"
rendered="#{not empty branchOffice.branchContactEmployee}"
>
<p:link
outcome="admin_show_basic_data"
target="_blank"
- value="#{beanHelper.renderBasicData(branchOfficeListController.selectedBranchOffice.branchCompany, false)}"
+ value="#{beanHelper.renderBasicData(branchOfficeListController.selectedBranchOffice.branchCompany, false, true)}"
title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
>
<f:param name="basicDataId" value="#{branchOfficeListController.selectedBranchOffice.branchCompany.basicDataId}" />
<p:link
outcome="admin_show_employee"
target="_blank"
- value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchContactEmployee)}"
+ value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchContactEmployee, true)}"
title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}"
rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}"
>
<p:link
outcome="admin_show_employee"
target="_blank"
- value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchOwnerEmployee)}"
+ value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchOwnerEmployee, true)}"
title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_EMPLOYEE_TITLE}"
rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}"
>
value="#{basicDataListController.allBasicData}"
var="basicData"
itemValue="#{basicData}"
- itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+ itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
/>
</p:selectCheckboxMenu>
</f:facet>
<p:link
outcome="admin_show_basic_data"
- value="#{beanHelper.renderBasicData(department.departmentCompany, true)}"
+ value="#{beanHelper.renderBasicData(department.departmentCompany, true, false)}"
title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
>
<f:param name="basicDataId" value="#{department.departmentCompany.basicDataId}" />
value="#{branchOfficeListController.allBranchOffices}"
var="branchOffice"
itemValue="#{branchOffice}"
- itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
+ itemLabel="#{beanHelper.renderBranchOffice(branchOffice, false)}"
/>
</p:selectCheckboxMenu>
</f:facet>
<p:link
outcome="admin_show_branch_office"
- value="#{beanHelper.renderBranchOffice(department.departmentBranchOffice)}"
+ value="#{beanHelper.renderBranchOffice(department.departmentBranchOffice, false)}"
title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
rendered="#{not empty department.departmentBranchOffice}"
>
value="#{employeeListController.allEmployees}"
var="employee"
itemValue="#{employee}"
- itemLabel="#{beanHelper.renderEmployee(employee)}"
+ itemLabel="#{beanHelper.renderEmployee(employee, false, false)}"
/>
</p:selectCheckboxMenu>
</f:facet>
<p:link
outcome="admin_show_employee"
- value="#{beanHelper.renderEmployee(department.departmentLead)}"
+ value="#{beanHelper.renderEmployee(department.departmentLead, true)}"
title="#{msg.ADMIN_LINK_SHOW_DEPARTMENT_LEAD_EMPLOYEE_TITLE}"
rendered="#{not empty department.departmentLead}"
>
value="#{branchOfficeListController.allBranchOffices}"
var="branchOffice"
itemValue="#{branchOffice}"
- itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
+ itemLabel="#{beanHelper.renderBranchOffice(branchOffice, false)}"
/>
</p:selectCheckboxMenu>
</f:facet>
<p:link
outcome="admin_show_branch_office"
- value="#{beanHelper.renderBranchOffice(employee.employeeBranchOffice)}"
+ value="#{beanHelper.renderBranchOffice(employee.employeeBranchOffice, false)}"
title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
rendered="#{not empty employee.employeeBranchOffice}"
>
value="#{basicDataListController.allBasicData}"
var="basicData"
itemValue="#{basicData}"
- itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+ itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
/>
</p:selectCheckboxMenu>
</f:facet>
<p:link
outcome="admin_show_basic_data"
- value="#{beanHelper.renderBasicData(employee.employeeBasicData, true)}"
+ value="#{beanHelper.renderBasicData(employee.employeeBasicData, true, false)}"
title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
>
<f:param name="basicDataId" value="#{employee.employeeBasicData.basicDataId}" />
value="#{employeeListController.allEmployees}"
var="employee"
itemValue="#{employee}"
- itemLabel="#{beanHelper.renderEmployee(employee)}"
+ itemLabel="#{beanHelper.renderEmployee(employee, false)}"
/>
</p:selectCheckboxMenu>
</f:facet>
<p:link
outcome="admin_show_employee"
- value="#{beanHelper.renderEmployee(headquarter.headquarterContactEmployee)}"
+ value="#{beanHelper.renderEmployee(headquarter.headquarterContactEmployee, false)}"
title="#{msg.ADMIN_LINK_SHOW_HEADQUARTER_CONTACT_PERSON_TITLE}"
rendered="#{not empty headquarter.headquarterContactEmployee}"
>