From 8dfba0866368c7de78faf8a5241b5c23e63de54b Mon Sep 17 00:00:00 2001
From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org>
Date: Mon, 11 May 2020 03:12:04 +0200
Subject: [PATCH] Please cherry-pick: - since departments, headquarters and
 branch offices cannot link to employes,   so also the view navigation rules
 must reflect this. Employees can have a   relationship to any these 3
 entities and would lead to endless loop - introduced
 adminDepartmentActionController instead of without "Action", let   us keep
 these empty ("dead") backing beans around, they may one day be filled   with
 life again. Or they will be removed if no purpose could be found. - closed
 some TODOs in views where p:fieldset allows a title attribute - also a
 ui:fragment can be avoided when p:fieldset allows a render attribute - added
 view for administrative editing of departments - removed double // NOI18N
 strings (ops?) which is for some language string   scanning and translation
 tools to ignore these lines (exception messages   should normally not show up
 to the user).
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

Signed-off-by: Roland Häder <roland@mxchange.org>
---
 ...AdminBranchOfficeActionWebRequestBean.java |  27 +-
 ...nancialsAdminDepartmentWebRequestBean.java | 227 ----------
 ...lsAdminDepartmentWebRequestController.java |   2 +-
 ...lsAdminDepartmentActionWebRequestBean.java | 412 ++++++++++++++++++
 ...nDepartmentActionWebRequestController.java |  28 ++
 .../FinancialsDepartmentListWebViewBean.java  |  16 +-
 ...sAdminHeadquarterActionWebRequestBean.java |   8 +-
 .../FinancialsAdminContactWebRequestBean.java |   8 +-
 .../FinancialsContactListWebViewBean.java     |   2 +-
 ...cialsAdminContactMobileWebRequestBean.java |   4 +-
 ...ncialsAdminContactPhoneWebRequestBean.java |   4 +-
 .../localization/generic_de_DE.properties     |  26 +-
 .../localization/generic_en_US.properties     |   8 +
 web/WEB-INF/faces-config.xml                  |  32 +-
 .../contact/admin_form_contact_data.tpl       |  10 +-
 .../form_data/user/admin_form_user_data.tpl   |  92 ++--
 .../admin_form_branch_office_data.tpl         |  20 +-
 .../department/admin_form_department_data.tpl |  20 +-
 .../employee/admin_form_employee_data.tpl     |  16 +-
 .../headquarter/admin_form_headquarter.tpl    |  10 +-
 .../admin_branch_office_list.xhtml            |  30 +-
 .../department/admin_department_edit.xhtml    |  80 ++++
 .../department/admin_department_list.xhtml    |  26 +-
 .../headquarter/admin_headquarter_list.xhtml  |  19 +-
 web/admin/user/admin_user_list.xhtml          |   9 +-
 25 files changed, 730 insertions(+), 406 deletions(-)
 create mode 100644 src/java/org/mxchange/jfinancials/beans/business/department/action/FinancialsAdminDepartmentActionWebRequestBean.java
 create mode 100644 src/java/org/mxchange/jfinancials/beans/business/department/action/FinancialsAdminDepartmentActionWebRequestController.java
 create mode 100644 web/admin/department/admin_department_edit.xhtml

diff --git a/src/java/org/mxchange/jfinancials/beans/business/branchoffice/action/FinancialsAdminBranchOfficeActionWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/business/branchoffice/action/FinancialsAdminBranchOfficeActionWebRequestBean.java
index e2ea689f..cf9d8eec 100644
--- a/src/java/org/mxchange/jfinancials/beans/business/branchoffice/action/FinancialsAdminBranchOfficeActionWebRequestBean.java
+++ b/src/java/org/mxchange/jfinancials/beans/business/branchoffice/action/FinancialsAdminBranchOfficeActionWebRequestBean.java
@@ -29,6 +29,7 @@ import javax.faces.FacesException;
 import javax.faces.application.FacesMessage;
 import javax.inject.Inject;
 import javax.inject.Named;
+import org.mxchange.jcontacts.model.contact.Contact;
 import org.mxchange.jcontactsbusiness.events.branchoffice.added.AdminBranchOfficeAddedEvent;
 import org.mxchange.jcontactsbusiness.events.branchoffice.added.ObservableAdminBranchOfficeAddedEvent;
 import org.mxchange.jcontactsbusiness.events.branchoffice.updated.AdminBranchOfficeUpdatedEvent;
@@ -40,7 +41,6 @@ import org.mxchange.jcontactsbusiness.model.branchoffice.AdminBranchOfficeSessio
 import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
 import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffices;
 import org.mxchange.jcontactsbusiness.model.branchoffice.BusinessBranchOffice;
-import org.mxchange.jcontactsbusiness.model.employee.Employable;
 import org.mxchange.jcontactsbusiness.model.opening_time.BusinessOpeningTime;
 import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime;
 import org.mxchange.jcoreee.dates.DayOfTheWeek;
@@ -91,7 +91,7 @@ public class FinancialsAdminBranchOfficeActionWebRequestBean extends BaseFinanci
 	/**
 	 * Contact person in branch office
 	 */
-	private Employable branchContactEmployee;
+	private Contact branchContactEmployee;
 
 	/**
 	 * Country
@@ -144,7 +144,7 @@ public class FinancialsAdminBranchOfficeActionWebRequestBean extends BaseFinanci
 	/**
 	 * Owner/leader of branch office
 	 */
-	private Employable branchOwnerEmployee;
+	private Contact branchOwnerEmployee;
 
 	/**
 	 * Store
@@ -396,7 +396,7 @@ public class FinancialsAdminBranchOfficeActionWebRequestBean extends BaseFinanci
 	 * <p>
 	 * @return Branch office contact person
 	 */
-	public Employable getBranchContactEmployee () {
+	public Contact getBranchContactEmployee () {
 		return this.branchContactEmployee;
 	}
 
@@ -405,7 +405,7 @@ public class FinancialsAdminBranchOfficeActionWebRequestBean extends BaseFinanci
 	 * <p>
 	 * @param branchContactEmployee Branch office contact person
 	 */
-	public void setBranchContactEmployee (final Employable branchContactEmployee) {
+	public void setBranchContactEmployee (final Contact branchContactEmployee) {
 		this.branchContactEmployee = branchContactEmployee;
 	}
 
@@ -560,7 +560,7 @@ public class FinancialsAdminBranchOfficeActionWebRequestBean extends BaseFinanci
 	 * <p>
 	 * @return Branch office contact person
 	 */
-	public Employable getBranchOwnerEmployee () {
+	public Contact getBranchOwnerEmployee () {
 		return this.branchOwnerEmployee;
 	}
 
@@ -569,7 +569,7 @@ public class FinancialsAdminBranchOfficeActionWebRequestBean extends BaseFinanci
 	 * <p>
 	 * @param branchOwnerEmployee Branch office contact person
 	 */
-	public void setBranchOwnerEmployee (final Employable branchOwnerEmployee) {
+	public void setBranchOwnerEmployee (final Contact branchOwnerEmployee) {
 		this.branchOwnerEmployee = branchOwnerEmployee;
 	}
 
@@ -871,8 +871,17 @@ public class FinancialsAdminBranchOfficeActionWebRequestBean extends BaseFinanci
 	 * @return Redirection outcome
 	 */
 	public String updateBranchOffice () {
-		// Id should be set
-		if (this.getBranchId() == null) {
+		// Validate current product instance and id
+		if (this.getCurrentBranchOffice() == null) {
+			// Throw NPE
+			throw new NullPointerException("this.product is null"); //NOI18N
+		} else if (this.getCurrentBranchOffice().getBranchId() == null) {
+			// Throw NPE again
+			throw new NullPointerException("this.product.branchId is null"); //NOI18N
+		} else if (this.getCurrentBranchOffice().getBranchId() < 1) {
+			// Not valid
+			throw new IllegalStateException(MessageFormat.format("this.product.branchId={0} is not valid.", this.getCurrentBranchOffice().getBranchId())); //NOI18N
+		} else if (this.getBranchId() == null) {
 			// Throw NPE
 			throw new NullPointerException("this.branchId is null"); //NOI18N
 		} else if (this.getBranchId() < 1) {
diff --git a/src/java/org/mxchange/jfinancials/beans/business/department/FinancialsAdminDepartmentWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/business/department/FinancialsAdminDepartmentWebRequestBean.java
index 6b15bc39..e3d4f9d9 100644
--- a/src/java/org/mxchange/jfinancials/beans/business/department/FinancialsAdminDepartmentWebRequestBean.java
+++ b/src/java/org/mxchange/jfinancials/beans/business/department/FinancialsAdminDepartmentWebRequestBean.java
@@ -16,26 +16,9 @@
  */
 package org.mxchange.jfinancials.beans.business.department;
 
-import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
-import javax.enterprise.event.Event;
-import javax.enterprise.inject.Any;
-import javax.faces.application.FacesMessage;
-import javax.inject.Inject;
 import javax.inject.Named;
-import org.mxchange.jcontactsbusiness.events.department.added.DepartmentAddedEvent;
-import org.mxchange.jcontactsbusiness.events.department.added.ObservableDepartmentAddedEvent;
-import org.mxchange.jcontactsbusiness.exceptions.department.DepartmentAlreadyAddedException;
-import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
-import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
-import org.mxchange.jcontactsbusiness.model.department.AdminDepartmentSessionBeanRemote;
-import org.mxchange.jcontactsbusiness.model.department.BusinessDepartment;
-import org.mxchange.jcontactsbusiness.model.department.Department;
-import org.mxchange.jcontactsbusiness.model.employee.Employable;
-import org.mxchange.jcontactsbusiness.model.headquarter.Headquarter;
 import org.mxchange.jfinancials.beans.BaseFinancialsBean;
-import org.mxchange.jfinancials.beans.business.department.list.FinancialsDepartmentListWebViewController;
-import org.mxchange.jusercore.model.user.User;
 
 /**
  * An administrative bean for departments
@@ -51,55 +34,6 @@ public class FinancialsAdminDepartmentWebRequestBean extends BaseFinancialsBean
 	 */
 	private static final long serialVersionUID = 5_028_697_360_464L;
 
-	/**
-	 * EJB for administrative purposes
-	 */
-	@EJB (lookup = "java:global/jfinancials-ejb/adminDepartment!org.mxchange.jcontactsbusiness.model.department.AdminDepartmentSessionBeanRemote")
-	private AdminDepartmentSessionBeanRemote adminDepartmentBean;
-
-	/**
-	 * An event being fired when a department has been successfully added
-	 */
-	@Inject
-	@Any
-	private Event<ObservableDepartmentAddedEvent> departmentAddedEvent;
-
-	/**
-	 * Assigned branch office (if apply-able)
-	 */
-	private BranchOffice departmentBranchOffice;
-
-	/**
-	 * Assigned company for this department
-	 */
-	private BasicData departmentCompany;
-
-	/**
-	 * Assigned headquarter (if apply-able)
-	 */
-	private Headquarter departmentHeadquarter;
-
-	/**
-	 * Department name
-	 */
-	private String departmentI18nKey;
-
-	/**
-	 * Lead person of this department
-	 */
-	private Employable departmentLead;
-
-	/**
-	 * A general department controller (backing bean)
-	 */
-	@Inject
-	private FinancialsDepartmentListWebViewController departmentListController;
-
-	/**
-	 * Owning user instance (which this department is assigned to)
-	 */
-	private User departmentUserOwner;
-
 	/**
 	 * Default constructor
 	 */
@@ -108,165 +42,4 @@ public class FinancialsAdminDepartmentWebRequestBean extends BaseFinancialsBean
 		super();
 	}
 
-	/**
-	 * Adds department with all data from this backing bean. First this action
-	 * method will validate if the department's address is already registered
-	 * and if found, it will output a proper faces message.
-	 */
-	public void addDepartment () {
-		// Get instance
-		final Department department = this.createDepartment();
-
-		// Is the department not created yet?
-		if (this.departmentListController.isDepartmentAlreadyAdded(department)) {
-			// Then show proper faces message
-			this.showFacesMessage("form-admin-add-department:branchStreet", "ADMIN_DEPARTMENT_ALREADY_CREATED", FacesMessage.SEVERITY_WARN); //NOI18N
-			return;
-		}
-
-		// Delcare updated instance
-		final Department updatedDepartment;
-
-		try {
-			// Try to call EJB
-			updatedDepartment = this.adminDepartmentBean.addDepartment(department);
-		} catch (final DepartmentAlreadyAddedException ex) {
-			// Output message
-			this.showFacesMessage("form-admin-add-department:departmentI18nKey", "ADMIN_DEPARTMENT_ALREADY_CREATED", FacesMessage.SEVERITY_ERROR); //NOI18N
-			return;
-		}
-
-		// Fire event
-		this.departmentAddedEvent.fire(new DepartmentAddedEvent(updatedDepartment));
-	}
-
-	/**
-	 * Getter for assigned branch office
-	 * <p>
-	 * @return Branch office
-	 */
-	public BranchOffice getDepartmentBranchOffice () {
-		return this.departmentBranchOffice;
-	}
-
-	/**
-	 * Setter for assigned branch office
-	 * <p>
-	 * @param departmentBranchOffice Branch office
-	 */
-	public void setDepartmentBranchOffice (final BranchOffice departmentBranchOffice) {
-		this.departmentBranchOffice = departmentBranchOffice;
-	}
-
-	/**
-	 * Getter for basic company data
-	 * <p>
-	 * @return Basic company data
-	 */
-	public BasicData getDepartmentCompany () {
-		return this.departmentCompany;
-	}
-
-	/**
-	 * Setter for basic company data
-	 * <p>
-	 * @param departmentCompany Basic company data
-	 */
-	public void setDepartmentCompany (final BasicData departmentCompany) {
-		this.departmentCompany = departmentCompany;
-	}
-
-	/**
-	 * Getter for assigned headquarter data
-	 * <p>
-	 * @return Headquarter data
-	 */
-	public Headquarter getDepartmentHeadquarter () {
-		return this.departmentHeadquarter;
-	}
-
-	/**
-	 * Setter for assigned headquarter data
-	 * <p>
-	 * @param departmentHeadquarter Headquarter data
-	 */
-	public void setDepartmentHeadquarter (final Headquarter departmentHeadquarter) {
-		this.departmentHeadquarter = departmentHeadquarter;
-	}
-
-	/**
-	 * Getter for department name
-	 * <p>
-	 * @return Department name
-	 */
-	public String getDepartmentI18nKey () {
-		return this.departmentI18nKey;
-	}
-
-	/**
-	 * Setter for department name
-	 * <p>
-	 * @param departmentI18nKey Department name
-	 */
-	public void setDepartmentI18nKey (final String departmentI18nKey) {
-		this.departmentI18nKey = departmentI18nKey;
-	}
-
-	/**
-	 * Getter for department contact person
-	 * <p>
-	 * @return Department contact person
-	 */
-	public Employable getDepartmentLead () {
-		return this.departmentLead;
-	}
-
-	/**
-	 * Setter for department contact person
-	 * <p>
-	 * @param departmentLead Department contact person
-	 */
-	public void setDepartmentLead (final Employable departmentLead) {
-		this.departmentLead = departmentLead;
-	}
-
-	/**
-	 * Getter for owning user instance
-	 * <p>
-	 * @return Owning user instance
-	 */
-	public User getDepartmentUserOwner () {
-		return this.departmentUserOwner;
-	}
-
-	/**
-	 * Setter for owning user instance
-	 * <p>
-	 * @param departmentUserOwner Owning user instance
-	 */
-	public void setDepartmentUserOwner (final User departmentUserOwner) {
-		this.departmentUserOwner = departmentUserOwner;
-	}
-
-	/**
-	 * Prepares an instance of a Department object (entity) with all data from
-	 * this bean. If a complete fax number or land-line number was provided, it
-	 * will be set in the instance as well.
-	 * <p>
-	 * @return An instance of a Department class (entity)
-	 */
-	private Department createDepartment () {
-		// Create new department instance
-		final Department department = new BusinessDepartment(this.getDepartmentCompany(), this.getDepartmentI18nKey());
-
-		// Add all optional fields
-		department.setDepartmentHeadquarter(this.getDepartmentHeadquarter());
-		department.setDepartmentBranchOffice(this.getDepartmentBranchOffice());
-		department.setDepartmentLead(this.getDepartmentLead());
-		department.setDepartmentUserOwner(this.getDepartmentUserOwner());
-
-		// Return fully prepared instance
-		return department;
-	}
-
 }
diff --git a/src/java/org/mxchange/jfinancials/beans/business/department/FinancialsAdminDepartmentWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/business/department/FinancialsAdminDepartmentWebRequestController.java
index f5d08221..c00ac171 100644
--- a/src/java/org/mxchange/jfinancials/beans/business/department/FinancialsAdminDepartmentWebRequestController.java
+++ b/src/java/org/mxchange/jfinancials/beans/business/department/FinancialsAdminDepartmentWebRequestController.java
@@ -19,7 +19,7 @@ package org.mxchange.jfinancials.beans.business.department;
 import java.io.Serializable;
 
 /**
- * An interface for administrative branch office controller
+ * An interface for administrative department controller
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
diff --git a/src/java/org/mxchange/jfinancials/beans/business/department/action/FinancialsAdminDepartmentActionWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/business/department/action/FinancialsAdminDepartmentActionWebRequestBean.java
new file mode 100644
index 00000000..e5834f26
--- /dev/null
+++ b/src/java/org/mxchange/jfinancials/beans/business/department/action/FinancialsAdminDepartmentActionWebRequestBean.java
@@ -0,0 +1,412 @@
+/*
+ * Copyright (C) 2017 - 2020 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.jfinancials.beans.business.department.action;
+
+import java.text.MessageFormat;
+import java.util.Objects;
+import javax.ejb.EJB;
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.event.Event;
+import javax.enterprise.inject.Any;
+import javax.faces.FacesException;
+import javax.faces.application.FacesMessage;
+import javax.inject.Inject;
+import javax.inject.Named;
+import org.mxchange.jcontacts.model.contact.Contact;
+import org.mxchange.jcontactsbusiness.events.department.added.AdminDepartmentAddedEvent;
+import org.mxchange.jcontactsbusiness.events.department.added.ObservableAdminDepartmentAddedEvent;
+import org.mxchange.jcontactsbusiness.events.department.updated.AdminDepartmentUpdatedEvent;
+import org.mxchange.jcontactsbusiness.events.department.updated.ObservableAdminDepartmentUpdatedEvent;
+import org.mxchange.jcontactsbusiness.exceptions.department.DepartmentAlreadyAddedException;
+import org.mxchange.jcontactsbusiness.exceptions.department.DepartmentNotFoundException;
+import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
+import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
+import org.mxchange.jcontactsbusiness.model.department.AdminDepartmentSessionBeanRemote;
+import org.mxchange.jcontactsbusiness.model.department.BusinessDepartment;
+import org.mxchange.jcontactsbusiness.model.department.Department;
+import org.mxchange.jcontactsbusiness.model.department.Departments;
+import org.mxchange.jcontactsbusiness.model.headquarter.Headquarter;
+import org.mxchange.jfinancials.beans.BaseFinancialsBean;
+import org.mxchange.jfinancials.beans.business.department.list.FinancialsDepartmentListWebViewController;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An administrative action bean for departments
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Named ("adminDepartmentActionController")
+@RequestScoped
+public class FinancialsAdminDepartmentActionWebRequestBean extends BaseFinancialsBean implements FinancialsAdminDepartmentActionWebRequestController {
+
+	/**
+	 * Serial number
+	 */
+	private static final long serialVersionUID = 5_028_697_360_473L;
+
+	/**
+	 * EJB for administrative purposes
+	 */
+	@EJB (lookup = "java:global/jfinancials-ejb/adminDepartment!org.mxchange.jcontactsbusiness.model.department.AdminDepartmentSessionBeanRemote")
+	private AdminDepartmentSessionBeanRemote adminDepartmentBean;
+
+	/**
+	 * Currently worked on department
+	 */
+	private Department currentDepartment;
+
+	/**
+	 * An event being fired when a department has been successfully added
+	 */
+	@Inject
+	@Any
+	private Event<ObservableAdminDepartmentAddedEvent> departmentAddedEvent;
+
+	/**
+	 * Assigned branch office (if apply-able)
+	 */
+	private BranchOffice departmentBranchOffice;
+
+	/**
+	 * Assigned company for this department
+	 */
+	private BasicData departmentCompany;
+
+	/**
+	 * Assigned headquarter (if apply-able)
+	 */
+	private Headquarter departmentHeadquarter;
+
+	/**
+	 * Department name
+	 */
+	private String departmentI18nKey;
+
+	/**
+	 * Primary key of department
+	 */
+	private Long departmentId;
+
+	/**
+	 * Lead person of this department
+	 */
+	private Contact departmentLead;
+
+	/**
+	 * A general department controller (backing bean)
+	 */
+	@Inject
+	private FinancialsDepartmentListWebViewController departmentListController;
+
+	/**
+	 * Owning user instance (which this department is assigned to)
+	 */
+	private User departmentUserOwner;
+
+	/**
+	 * Event being fired when a department has been updated
+	 */
+	@Inject
+	@Any
+	private Event<ObservableAdminDepartmentUpdatedEvent> updatedDepartmentEvent;
+
+	/**
+	 * Default constructor
+	 */
+	public FinancialsAdminDepartmentActionWebRequestBean () {
+		// Call super constructor
+		super();
+	}
+
+	/**
+	 * Adds department with all data from this backing bean. First this action
+	 * method will validate if the department's address is already registered
+	 * and if found, it will output a proper faces message.
+	 */
+	public void addDepartment () {
+		// Get instance
+		final Department department = this.createDepartment();
+
+		// Is the department not created yet?
+		if (this.departmentListController.isDepartmentAlreadyAdded(department)) {
+			// Then show proper faces message
+			this.showFacesMessage("form-admin-add-department:branchStreet", "ADMIN_DEPARTMENT_ALREADY_CREATED", FacesMessage.SEVERITY_WARN); //NOI18N
+			return;
+		}
+
+		// Delcare updated instance
+		final Department updatedDepartment;
+
+		try {
+			// Try to call EJB
+			updatedDepartment = this.adminDepartmentBean.addDepartment(department);
+		} catch (final DepartmentAlreadyAddedException ex) {
+			// Output message
+			this.showFacesMessage("form-admin-add-department:departmentI18nKey", "ADMIN_DEPARTMENT_ALREADY_CREATED", FacesMessage.SEVERITY_ERROR); //NOI18N
+			return;
+		}
+
+		// Fire event
+		this.departmentAddedEvent.fire(new AdminDepartmentAddedEvent(updatedDepartment));
+	}
+
+	/**
+	 * Copies all properties from current department to this bean.
+	 */
+	public void copyAllDepartmentProperties () {
+		// Is current department set?
+		if (this.getCurrentDepartment() == null) {
+			// Throw NPE
+			throw new NullPointerException("this.currentDepartment is null"); //NOI18N
+		} else if (this.getCurrentDepartment().getDepartmentId() == null) {
+			// Throw NPE
+			throw new NullPointerException("this.currentDepartment.departmentId is null"); //NOI18N
+		} else if (this.getCurrentDepartment().getDepartmentId() < 1) {
+			// Throw IAE
+			throw new IllegalArgumentException(MessageFormat.format("this.currentDepartment.departmentId={0} is not valid", this.getCurrentDepartment().getDepartmentId())); //NOI18N
+		}
+
+		// Copy all fields
+		this.setDepartmentBranchOffice(this.getCurrentDepartment().getDepartmentBranchOffice());
+		this.setDepartmentCompany(this.getCurrentDepartment().getDepartmentCompany());
+		this.setDepartmentHeadquarter(this.getCurrentDepartment().getDepartmentHeadquarter());
+		this.setDepartmentI18nKey(this.getCurrentDepartment().getDepartmentI18nKey());
+		this.setDepartmentId(this.getCurrentDepartment().getDepartmentId());
+		this.setDepartmentLead(this.getCurrentDepartment().getDepartmentLead());
+		this.setDepartmentUserOwner(this.getCurrentDepartment().getDepartmentUserOwner());
+	}
+
+	/**
+	 * Getter for current department
+	 * <p>
+	 * @return Current department
+	 */
+	public Department getCurrentDepartment () {
+		return this.currentDepartment;
+	}
+
+	/**
+	 * Setter for current department
+	 * <p>
+	 * @param currentDepartment Current department
+	 */
+	public void setCurrentDepartment (final Department currentDepartment) {
+		this.currentDepartment = currentDepartment;
+	}
+
+	/**
+	 * Getter for assigned branch office
+	 * <p>
+	 * @return Branch office
+	 */
+	public BranchOffice getDepartmentBranchOffice () {
+		return this.departmentBranchOffice;
+	}
+
+	/**
+	 * Setter for assigned branch office
+	 * <p>
+	 * @param departmentDepartment Branch office
+	 */
+	public void setDepartmentBranchOffice (final BranchOffice departmentDepartment) {
+		this.departmentBranchOffice = departmentDepartment;
+	}
+
+	/**
+	 * Getter for basic company data
+	 * <p>
+	 * @return Basic company data
+	 */
+	public BasicData getDepartmentCompany () {
+		return this.departmentCompany;
+	}
+
+	/**
+	 * Setter for basic company data
+	 * <p>
+	 * @param departmentCompany Basic company data
+	 */
+	public void setDepartmentCompany (final BasicData departmentCompany) {
+		this.departmentCompany = departmentCompany;
+	}
+
+	/**
+	 * Getter for assigned headquarter data
+	 * <p>
+	 * @return Headquarter data
+	 */
+	public Headquarter getDepartmentHeadquarter () {
+		return this.departmentHeadquarter;
+	}
+
+	/**
+	 * Setter for assigned headquarter data
+	 * <p>
+	 * @param departmentHeadquarter Headquarter data
+	 */
+	public void setDepartmentHeadquarter (final Headquarter departmentHeadquarter) {
+		this.departmentHeadquarter = departmentHeadquarter;
+	}
+
+	/**
+	 * Getter for department name
+	 * <p>
+	 * @return Department name
+	 */
+	public String getDepartmentI18nKey () {
+		return this.departmentI18nKey;
+	}
+
+	/**
+	 * Setter for department name
+	 * <p>
+	 * @param departmentI18nKey Department name
+	 */
+	public void setDepartmentI18nKey (final String departmentI18nKey) {
+		this.departmentI18nKey = departmentI18nKey;
+	}
+
+	/**
+	 * Getter for primary key
+	 * <p>
+	 * @return Primary key
+	 */
+	public Long getDepartmentId () {
+		return this.departmentId;
+	}
+
+	/**
+	 * Setter for primary key
+	 * <p>
+	 * @param departmentId Primary key
+	 */
+	public void setDepartmentId (final Long departmentId) {
+		this.departmentId = departmentId;
+	}
+
+	/**
+	 * Getter for department contact person
+	 * <p>
+	 * @return Department contact person
+	 */
+	public Contact getDepartmentLead () {
+		return this.departmentLead;
+	}
+
+	/**
+	 * Setter for department contact person
+	 * <p>
+	 * @param departmentLead Department contact person
+	 */
+	public void setDepartmentLead (final Contact departmentLead) {
+		this.departmentLead = departmentLead;
+	}
+
+	/**
+	 * Getter for owning user instance
+	 * <p>
+	 * @return Owning user instance
+	 */
+	public User getDepartmentUserOwner () {
+		return this.departmentUserOwner;
+	}
+
+	/**
+	 * Setter for owning user instance
+	 * <p>
+	 * @param departmentUserOwner Owning user instance
+	 */
+	public void setDepartmentUserOwner (final User departmentUserOwner) {
+		this.departmentUserOwner = departmentUserOwner;
+	}
+
+	/**
+	 * Updates department record with data from this bean.
+	 * <p>
+	 * @return Redirection outcome
+	 */
+	public String updateDepartment () {
+		// Is current department set?
+		if (this.getCurrentDepartment() == null) {
+			// Throw NPE
+			throw new NullPointerException("this.currentDepartment is null"); //NOI18N
+		} else if (this.getCurrentDepartment().getDepartmentId() == null) {
+			// Throw NPE
+			throw new NullPointerException("this.currentDepartment.departmentId is null"); //NOI18N
+		} else if (this.getCurrentDepartment().getDepartmentId() < 1) {
+			// Throw IAE
+			throw new IllegalArgumentException(MessageFormat.format("this.currentDepartment.departmentId={0} is not valid", this.getCurrentDepartment().getDepartmentId())); //NOI18N
+		}
+
+		// Init instance with current data
+		final Department department = this.createDepartment();
+
+		// Does current (not updated) and just created (maybe updated) match?
+		System.out.println("this.currentDepartment.departmentLead=" + this.getCurrentDepartment().getDepartmentLead() + ",department.departmentLead=" + department.getDepartmentLead() + " - BEFORE!");
+		if (Objects.equals(this.getCurrentDepartment(), department)) {
+			// Yes, then output message
+			this.showFacesMessage("form-admin-edit-department:departmentI18nKey", "ADMIN_DEPARTMENT_NOT_UPDATED", FacesMessage.SEVERITY_WARN); //NOI18N
+
+			// Skip below code
+			return ""; //NOI18N
+		}
+
+		// Copy all fields
+		Departments.copyDepartmentData(this.getCurrentDepartment(), department);
+
+		// Initialize updated instance
+		final Department updatedDepartment;
+
+		// Try it
+		try {
+			// Invoke EJB
+			updatedDepartment = this.adminDepartmentBean.updateDepartment(department);
+		} catch (final DepartmentNotFoundException ex) {
+			// Throw as a cause
+			throw new FacesException(ex);
+		}
+
+		// Fire event
+		this.updatedDepartmentEvent.fire(new AdminDepartmentUpdatedEvent(updatedDepartment));
+
+		// Return to list view
+		return "admin_list_departments"; //NOI18N
+	}
+
+	/**
+	 * Prepares an instance of a Department object (entity) with all data from
+	 * this bean. If a complete fax number or land-line number was provided, it
+	 * will be set in the instance as well.
+	 * <p>
+	 * @return An instance of a Department class (entity)
+	 */
+	private Department createDepartment () {
+		// Create new department instance
+		final Department department = new BusinessDepartment(this.getDepartmentCompany(), this.getDepartmentI18nKey());
+
+		// Add all optional fields
+		department.setDepartmentBranchOffice(this.getDepartmentBranchOffice());
+		department.setDepartmentHeadquarter(this.getDepartmentHeadquarter());
+		department.setDepartmentId(this.getDepartmentId());
+		department.setDepartmentLead(this.getDepartmentLead());
+		department.setDepartmentUserOwner(this.getDepartmentUserOwner());
+
+		// Return fully prepared instance
+		return department;
+	}
+
+}
diff --git a/src/java/org/mxchange/jfinancials/beans/business/department/action/FinancialsAdminDepartmentActionWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/business/department/action/FinancialsAdminDepartmentActionWebRequestController.java
new file mode 100644
index 00000000..3d94efe4
--- /dev/null
+++ b/src/java/org/mxchange/jfinancials/beans/business/department/action/FinancialsAdminDepartmentActionWebRequestController.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 - 2020 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.jfinancials.beans.business.department.action;
+
+import java.io.Serializable;
+
+/**
+ * An interface for administrative action department controller
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface FinancialsAdminDepartmentActionWebRequestController extends Serializable {
+
+}
diff --git a/src/java/org/mxchange/jfinancials/beans/business/department/list/FinancialsDepartmentListWebViewBean.java b/src/java/org/mxchange/jfinancials/beans/business/department/list/FinancialsDepartmentListWebViewBean.java
index c39af5c4..7408d4f8 100644
--- a/src/java/org/mxchange/jfinancials/beans/business/department/list/FinancialsDepartmentListWebViewBean.java
+++ b/src/java/org/mxchange/jfinancials/beans/business/department/list/FinancialsDepartmentListWebViewBean.java
@@ -28,7 +28,7 @@ import javax.enterprise.event.Observes;
 import javax.faces.view.ViewScoped;
 import javax.inject.Inject;
 import javax.inject.Named;
-import org.mxchange.jcontactsbusiness.events.department.added.ObservableDepartmentAddedEvent;
+import org.mxchange.jcontactsbusiness.events.department.added.ObservableAdminDepartmentAddedEvent;
 import org.mxchange.jcontactsbusiness.exceptions.department.DepartmentNotFoundException;
 import org.mxchange.jcontactsbusiness.model.department.Department;
 import org.mxchange.jcontactsbusiness.model.department.DepartmentSessionBeanRemote;
@@ -97,25 +97,25 @@ public class FinancialsDepartmentListWebViewBean extends BaseFinancialsBean impl
 	 * null
 	 * @throws IllegalArgumentException If the branchId is zero or lower
 	 */
-	public void afterDepartmentAddedEvent (@Observes final ObservableDepartmentAddedEvent event) {
+	public void afterDepartmentAddedEvent (@Observes final ObservableAdminDepartmentAddedEvent event) {
 		// Validate parameter
 		if (null == event) {
 			// Throw NPE
 			throw new NullPointerException("event is null"); //NOI18N
-		} else if (event.getDepartment() == null) {
+		} else if (event.getAddedDepartment() == null) {
 			// Throw NPE again
 			throw new NullPointerException("event.department is null"); //NOI18N
-		} else if (event.getDepartment().getDepartmentId() == null) {
+		} else if (event.getAddedDepartment().getDepartmentId() == null) {
 			// Throw it again
 			throw new NullPointerException("event.department.branchId is null"); //NOI18N
-		} else if (event.getDepartment().getDepartmentId() < 1) {
+		} else if (event.getAddedDepartment().getDepartmentId() < 1) {
 			// Throw IAE
-			throw new IllegalArgumentException(MessageFormat.format("event.department.branchId={0} is not valid", event.getDepartment().getDepartmentId())); //NOI18N
+			throw new IllegalArgumentException(MessageFormat.format("event.department.branchId={0} is not valid", event.getAddedDepartment().getDepartmentId())); //NOI18N
 		}
 
 		// Add instance to cache
-		this.departmentCache.put(event.getDepartment().getDepartmentId(), event.getDepartment());
-		this.getAllDepartments().add(event.getDepartment());
+		this.departmentCache.put(event.getAddedDepartment().getDepartmentId(), event.getAddedDepartment());
+		this.getAllDepartments().add(event.getAddedDepartment());
 	}
 
 	@Override
diff --git a/src/java/org/mxchange/jfinancials/beans/business/headquarter/action/FinancialsAdminHeadquarterActionWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/business/headquarter/action/FinancialsAdminHeadquarterActionWebRequestBean.java
index 6e2faccc..665eb9d4 100644
--- a/src/java/org/mxchange/jfinancials/beans/business/headquarter/action/FinancialsAdminHeadquarterActionWebRequestBean.java
+++ b/src/java/org/mxchange/jfinancials/beans/business/headquarter/action/FinancialsAdminHeadquarterActionWebRequestBean.java
@@ -27,10 +27,10 @@ import javax.enterprise.inject.Any;
 import javax.faces.application.FacesMessage;
 import javax.inject.Inject;
 import javax.inject.Named;
+import org.mxchange.jcontacts.model.contact.Contact;
 import org.mxchange.jcontactsbusiness.events.headquarter.added.HeadquarterAddedEvent;
 import org.mxchange.jcontactsbusiness.events.headquarter.added.ObservableHeadquarterAddedEvent;
 import org.mxchange.jcontactsbusiness.exceptions.headquarter.HeadquarterAlreadyAddedException;
-import org.mxchange.jcontactsbusiness.model.employee.Employable;
 import org.mxchange.jcontactsbusiness.model.headquarter.AdminHeadquarterSessionBeanRemote;
 import org.mxchange.jcontactsbusiness.model.headquarter.BusinessHeadquarter;
 import org.mxchange.jcontactsbusiness.model.headquarter.Headquarter;
@@ -106,7 +106,7 @@ public class FinancialsAdminHeadquarterActionWebRequestBean extends BaseFinancia
 	/**
 	 * Contact person in headquarter
 	 */
-	private Employable headquarterContactEmployee;
+	private Contact headquarterContactEmployee;
 
 	/**
 	 * Country
@@ -380,7 +380,7 @@ public class FinancialsAdminHeadquarterActionWebRequestBean extends BaseFinancia
 	 * <p>
 	 * @return Headquarter contact person
 	 */
-	public Employable getHeadquarterContactEmployee () {
+	public Contact getHeadquarterContactEmployee () {
 		return this.headquarterContactEmployee;
 	}
 
@@ -389,7 +389,7 @@ public class FinancialsAdminHeadquarterActionWebRequestBean extends BaseFinancia
 	 * <p>
 	 * @param headquarterContactEmployee Headquarter contact person
 	 */
-	public void setHeadquarterContactEmployee (final Employable headquarterContactEmployee) {
+	public void setHeadquarterContactEmployee (final Contact headquarterContactEmployee) {
 		this.headquarterContactEmployee = headquarterContactEmployee;
 	}
 
diff --git a/src/java/org/mxchange/jfinancials/beans/contact/FinancialsAdminContactWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/contact/FinancialsAdminContactWebRequestBean.java
index 820c1d0c..1344e290 100644
--- a/src/java/org/mxchange/jfinancials/beans/contact/FinancialsAdminContactWebRequestBean.java
+++ b/src/java/org/mxchange/jfinancials/beans/contact/FinancialsAdminContactWebRequestBean.java
@@ -326,10 +326,10 @@ public class FinancialsAdminContactWebRequestBean extends BaseFinancialsBean imp
 			throw new NullPointerException("event is null"); //NOI18N
 		} else if (event.getCreatedContact() == null) {
 			// Throw NPE again
-			throw new NullPointerException("event.createdContact is null"); //NOI18N //NOI18N
+			throw new NullPointerException("event.createdContact is null"); //NOI18N
 		} else if (event.getCreatedContact().getContactId() == null) {
 			// Throw NPE again
-			throw new NullPointerException("event.createdContact.contactId is null"); //NOI18N //NOI18N
+			throw new NullPointerException("event.createdContact.contactId is null"); //NOI18N
 		} else if (event.getCreatedContact().getContactId() < 1) {
 			// Not valid
 			throw new IllegalStateException(MessageFormat.format("event.createdContact.contactId={0} is not valid.", event.getCreatedContact().getContactId())); //NOI18N
@@ -559,7 +559,7 @@ public class FinancialsAdminContactWebRequestBean extends BaseFinancialsBean imp
 			throw new NullPointerException("beanHelper.contact is null"); //NOI18N
 		} else if (createdContact.getContactId() == null) {
 			// Throw NPE again
-			throw new NullPointerException("beanHelper.contact.contactId is null"); //NOI18N //NOI18N
+			throw new NullPointerException("beanHelper.contact.contactId is null"); //NOI18N
 		} else if (createdContact.getContactId() < 1) {
 			// Invalid id
 			throw new IllegalStateException(MessageFormat.format("beanHelper.contact.contactId={0} is invalid", createdContact.getContactId())); //NOI18N
@@ -1187,7 +1187,7 @@ public class FinancialsAdminContactWebRequestBean extends BaseFinancialsBean imp
 			throw new NullPointerException("contact is null"); //NOI18N
 		} else if (contact.getContactId() == null) {
 			// Throw NPE again
-			throw new NullPointerException("contact.contactId is null"); //NOI18N //NOI18N
+			throw new NullPointerException("contact.contactId is null"); //NOI18N
 		} else if (contact.getContactId() < 1) {
 			// Invalid id
 			throw new IllegalStateException(MessageFormat.format("contact.contactId={0} is invalid", contact.getContactId())); //NOI18N
diff --git a/src/java/org/mxchange/jfinancials/beans/contact/list/FinancialsContactListWebViewBean.java b/src/java/org/mxchange/jfinancials/beans/contact/list/FinancialsContactListWebViewBean.java
index 65c5a6f7..b61e91d6 100644
--- a/src/java/org/mxchange/jfinancials/beans/contact/list/FinancialsContactListWebViewBean.java
+++ b/src/java/org/mxchange/jfinancials/beans/contact/list/FinancialsContactListWebViewBean.java
@@ -118,7 +118,7 @@ public class FinancialsContactListWebViewBean extends BaseFinancialsBean impleme
 			throw new NullPointerException("event.addedContact.contactId is null"); //NOI18N
 		} else if (event.getAddedContact().getContactId() < 1) {
 			// Not valid
-			throw new IllegalArgumentException(MessageFormat.format("event.addedContact.contactId={0} is not valid", event.getAddedContact().getContactId())); //NOI18N //NOI18N
+			throw new IllegalArgumentException(MessageFormat.format("event.addedContact.contactId={0} is not valid", event.getAddedContact().getContactId())); //NOI18N
 		}
 
 		// Call other method
diff --git a/src/java/org/mxchange/jfinancials/beans/contact/mobile/FinancialsAdminContactMobileWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/contact/mobile/FinancialsAdminContactMobileWebRequestBean.java
index 466febe6..730de394 100644
--- a/src/java/org/mxchange/jfinancials/beans/contact/mobile/FinancialsAdminContactMobileWebRequestBean.java
+++ b/src/java/org/mxchange/jfinancials/beans/contact/mobile/FinancialsAdminContactMobileWebRequestBean.java
@@ -213,10 +213,10 @@ public class FinancialsAdminContactMobileWebRequestBean extends BaseFinancialsBe
 			throw new NullPointerException("event is null"); //NOI18N
 		} else if (event.getCreatedContact() == null) {
 			// Throw NPE again
-			throw new NullPointerException("event.createdContact is null"); //NOI18N //NOI18N
+			throw new NullPointerException("event.createdContact is null"); //NOI18N
 		} else if (event.getCreatedContact().getContactId() == null) {
 			// Throw NPE again
-			throw new NullPointerException("event.createdContact.contactId is null"); //NOI18N //NOI18N
+			throw new NullPointerException("event.createdContact.contactId is null"); //NOI18N
 		} else if (event.getCreatedContact().getContactId() < 1) {
 			// Not valid
 			throw new IllegalStateException(MessageFormat.format("event.createdContact.contactId={0} is not valid.", event.getCreatedContact().getContactId())); //NOI18N
diff --git a/src/java/org/mxchange/jfinancials/beans/contact/phone/FinancialsAdminContactPhoneWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/contact/phone/FinancialsAdminContactPhoneWebRequestBean.java
index 59df8b15..da191490 100644
--- a/src/java/org/mxchange/jfinancials/beans/contact/phone/FinancialsAdminContactPhoneWebRequestBean.java
+++ b/src/java/org/mxchange/jfinancials/beans/contact/phone/FinancialsAdminContactPhoneWebRequestBean.java
@@ -266,10 +266,10 @@ public class FinancialsAdminContactPhoneWebRequestBean extends BaseFinancialsBea
 			throw new NullPointerException("event is null"); //NOI18N
 		} else if (event.getCreatedContact() == null) {
 			// Throw NPE again
-			throw new NullPointerException("event.createdContact is null"); //NOI18N //NOI18N
+			throw new NullPointerException("event.createdContact is null"); //NOI18N
 		} else if (event.getCreatedContact().getContactId() == null) {
 			// Throw NPE again
-			throw new NullPointerException("event.createdContact.contactId is null"); //NOI18N //NOI18N
+			throw new NullPointerException("event.createdContact.contactId is null"); //NOI18N
 		} else if (event.getCreatedContact().getContactId() < 1) {
 			// Not valid
 			throw new IllegalStateException(MessageFormat.format("event.createdContact.contactId={0} is not valid.", event.getCreatedContact().getContactId())); //NOI18N
diff --git a/src/java/org/mxchange/localization/generic_de_DE.properties b/src/java/org/mxchange/localization/generic_de_DE.properties
index 3a7b35d4..416ad8c3 100644
--- a/src/java/org/mxchange/localization/generic_de_DE.properties
+++ b/src/java/org/mxchange/localization/generic_de_DE.properties
@@ -275,8 +275,7 @@ ADMIN_MENU_COUNTRY_TITLE=L\u00e4nderdaten
 ADMIN_LINK_LIST_COUNTRIES=L\u00e4nder
 ADMIN_LINK_LIST_COUNTRIES_TITLE=Bestehende L\u00e4nderdaten auflisten, neue hinzuf\u00fcgen, \u00e4ndern und l\u00f6schen.
 PAGE_TITLE_ADMIN_LIST_COUNTRY=L\u00e4nderdaten auflisten
-#@TODO Please fix German umlauts!
-CONTENT_TITLE_ADMIN_LIST_COUNTRY=Auflisten von Laenderdaten:
+CONTENT_TITLE_ADMIN_LIST_COUNTRY=Auflisten von L\u00e4nderdaten:
 ADMIN_ADD_COUNTRY_TITLE=Neues Land hinzuf\u00fcgen
 ADMIN_COUNTRY_DATA_MINIMUM_NOTICE=Bitte geben Sie alle Felder an.
 ADMIN_ADD_COUNTRY_I18N_KEY_NOTICE=Der Schl\u00fcssel f\u00fcr das Sprachpaket ist in Grossbuchstaben und Unterstrichen zu schreiben. Beispiel: COUNTRY_GERMANY f\u00fcr Deutschland
@@ -912,12 +911,11 @@ ADMIN_LINK_EDIT_MOBILE_PROVIDER_TITLE=Edieren des Mobilfunkanbieters.
 #@TODO Please fix German umlauts!
 ADMIN_LINK_DELETE_MOBILE_PROVIDER_TITLE=Loescht den Mobilfunkanbieter.
 ADMIN_LINK_SHOW_COUNTRY_TITLE=Zeigt Details des Landes an.
+ADMIN_LINK_EDIT_COUNTRY_TITLE=Editieren der L\u00e4nderdaten.
 #@TODO Please fix German umlauts!
-ADMIN_LINK_EDIT_COUNTRY_TITLE=Editieren der Laenderdaten.
-#@TODO Please fix German umlauts!
-ADMIN_LINK_DELETE_COUNTRY_TITLE=Loescht die Laenderdaten.
+ADMIN_LINK_DELETE_COUNTRY_TITLE=Loescht die L\u00e4nderdaten.
 #@TODO Please fix German umlauts!
-ADMIN_EMPTY_LIST_COUNTRY=Es befinden sich keine Laender in der Datenbank. Oder Ihre Suche ergab keine Uebereinstimmungen.
+ADMIN_EMPTY_LIST_COUNTRY=Es befinden sich keine L\u00e4nder in der Datenbank. Oder Ihre Suche ergab keine Uebereinstimmungen.
 #@TODO Please fix German umlauts!
 ADMIN_EMPTY_LIST_FAX_NUMBER=Es befinden sich keine Faxnummern in der Datenbank oder Ihre Suche ergab keine Uebereinstimmungen.
 #@TODO Please fix German umlauts!
@@ -928,10 +926,8 @@ ADMIN_EMPTY_LIST_MOBILE_NUMBER=Es befinden sich keine Mobilfunknummern in der Da
 ADMIN_EMPTY_LIST_CONTACT_MOBILE=Es befinden sich keine Mobilfunknummern von Kontakten in der Datenbank oder Ihre Suche ergab keine Uebereinstimmungen.
 #@TODO Please fix German umlauts!
 ADMIN_MOBILE_PROVIDER_COUNTRY_REQUIRED=Bitte waehlen Sie ein Land f\u00fcr den Mobilfunkanbieter aus.
-#@TODO Please fix German umlauts!
-LABEL_COUNTRIES=Laender
-#@TODO Please fix German umlauts!
-FILTER_BY_MULTIPLE_COUNTRY_TITLE=Liste durch Auswahl von ein oder mehr Laendern durchsuchen.
+LABEL_COUNTRIES=L\u00e4nder
+FILTER_BY_MULTIPLE_COUNTRY_TITLE=Liste durch Auswahl von ein oder mehr L\u00e4ndern durchsuchen.
 ADMIN_LIST_MOBILE_PROVIDERS_HEADER=Liste aller Mobilfunkanbieter
 SELECT_SHOWN_COLUMNS=Angezeigte Spalten
 ADMIN_LIST_BRANCH_OFFICES_HEADER=Alle Filialen auflisten
@@ -1223,3 +1219,13 @@ CONTENT_TITLE_ADMIN_EDIT_BRANCH_OFFICE=Filiale editieren:
 ADMIN_EDIT_BRANCH_OFFICE_TITLE=Filiale mit Id-Nummer {0} editieren:
 ADMIN_EDIT_BRANCH_OFFICE_NUMBER_TITLE=Filiale Nummer {1} (Id {0}) editieren:
 BUTTON_ADMIN_EDIT_BRANCH_OFFICE=Filiale \u00e4ndern
+ERROR_PARAMETER_DEPARTMENT_ID_NOT_SET=Fehler: Parameter "departmentId" ist nicht gesetzt.
+PARAMETER_DEPARTMENT_ID_INVALID=Unter der angegebenen Id-Nummer konnte keine Abteilung gefunden werden..
+PAGE_TITLE_ADMIN_EDIT_DEPARTMENT=Abteilung editieren
+CONTENT_TITLE_ADMIN_EDIT_DEPARTMENT=Abteilung editieren:
+ADMIN_EDIT_DEPARTMENT_TITLE=Editing department {0} (Id {1}):
+#@TODO Please fix German umlauts!
+ADMIN_DEPARTMENT_MINIMUM_DATA=Bitte geben Sie mindestens den Internationalisierungsschlussel ein, waehlen Sie ein Unternehmen aus und entweder eine Filiale oder einen Hauptsitz als mindest benoetigte Daten aus.
+BUTTON_ADMIN_EDIT_DEPARTMENT=Abteilung \u00e4ndern
+#@TODO Please fix German umlauts!
+ADMIN_DEPARTMENT_NOT_UPDATED=Sie haben keine Daten der Filiale geaendert.
diff --git a/src/java/org/mxchange/localization/generic_en_US.properties b/src/java/org/mxchange/localization/generic_en_US.properties
index 05ef418a..df5ff6b3 100644
--- a/src/java/org/mxchange/localization/generic_en_US.properties
+++ b/src/java/org/mxchange/localization/generic_en_US.properties
@@ -1133,3 +1133,11 @@ CONTENT_TITLE_ADMIN_EDIT_BRANCH_OFFICE=Edit branch office:
 ADMIN_EDIT_BRANCH_OFFICE_TITLE=Edit branch office with id {0}:
 ADMIN_EDIT_BRANCH_OFFICE_NUMBER_TITLE=Edit branch office number {1} (Id {0}):
 BUTTON_ADMIN_EDIT_BRANCH_OFFICE=Change branch office
+ERROR_PARAMETER_DEPARTMENT_ID_NOT_SET=Error: Parameter "departmentId" is not set.
+PARAMETER_DEPARTMENT_ID_INVALID=No depatment could be found by provided id number.
+PAGE_TITLE_ADMIN_EDIT_DEPARTMENT=Edit department
+CONTENT_TITLE_ADMIN_EDIT_DEPARTMENT=Edit department:
+ADMIN_EDIT_DEPARTMENT_TITLE=Editing department {0} (Id {1}):
+ADMIN_DEPARTMENT_MINIMUM_DATA=Please entet at least an i18n string, selecct a company and either select a branch office or a headquarter as minimum required data.
+BUTTON_ADMIN_EDIT_DEPARTMENT=Change department
+ADMIN_DEPARTMENT_NOT_UPDATED=You have not changed any data of the department.
diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml
index fa377e6c..622fcd2b 100644
--- a/web/WEB-INF/faces-config.xml
+++ b/web/WEB-INF/faces-config.xml
@@ -129,7 +129,7 @@
 			<to-view-id>/admin/opening_time/admin_opening_time_list.xhtml</to-view-id>
 		</navigation-case>
 		<navigation-case>
-			<from-outcome>admin_list_company_employee</from-outcome>
+			<from-outcome>admin_list_employee</from-outcome>
 			<to-view-id>/admin/employee/admin_employee_list.xhtml</to-view-id>
 		</navigation-case>
 		<navigation-case>
@@ -777,8 +777,8 @@
 			<to-view-id>/admin/basic_data/admin_basic_data_assign_owner.xhtml</to-view-id>
 		</navigation-case>
 		<navigation-case>
-			<from-outcome>admin_show_employee</from-outcome>
-			<to-view-id>/admin/company_employee/admin_company_employee_show.xhtml</to-view-id>
+			<from-outcome>admin_show_contact</from-outcome>
+			<to-view-id>/admin/contact/admin_contact_show.xhtml</to-view-id>
 		</navigation-case>
 		<navigation-case>
 			<from-outcome>admin_assign_basic_data_employee</from-outcome>
@@ -808,12 +808,12 @@
 			<to-view-id>/admin/headquarter/admin_headquarter_assign_owner.xhtml</to-view-id>
 		</navigation-case>
 		<navigation-case>
-			<from-outcome>admin_show_employee</from-outcome>
-			<to-view-id>/admin/company_employee/admin_company_employee_show.xhtml</to-view-id>
+			<from-outcome>admin_show_contact</from-outcome>
+			<to-view-id>/admin/contact/admin_contact_show.xhtml</to-view-id>
 		</navigation-case>
 		<navigation-case>
-			<from-outcome>admin_assign_headquarter_employee</from-outcome>
-			<to-view-id>/admin/headquarter/admin_headquarter_assign_employee.xhtml</to-view-id>
+			<from-outcome>admin_assign_headquarter_contact</from-outcome>
+			<to-view-id>/admin/headquarter/admin_headquarter_assign_contact.xhtml</to-view-id>
 		</navigation-case>
 	</navigation-rule>
 	<navigation-rule>
@@ -843,8 +843,8 @@
 			<to-view-id>/admin/basic_data/admin_basic_data_show.xhtml</to-view-id>
 		</navigation-case>
 		<navigation-case>
-			<from-outcome>admin_show_employee</from-outcome>
-			<to-view-id>/admin/company_employee/admin_company_employee_show.xhtml</to-view-id>
+			<from-outcome>admin_show_contact</from-outcome>
+			<to-view-id>/admin/contact/admin_contact_show.xhtml</to-view-id>
 		</navigation-case>
 		<navigation-case>
 			<from-outcome>admin_assign_branch_office_employee</from-outcome>
@@ -890,8 +890,8 @@
 			<to-view-id>/admin/department/admin_assign_department_branch_office.xhtml</to-view-id>
 		</navigation-case>
 		<navigation-case>
-			<from-outcome>admin_show_employee</from-outcome>
-			<to-view-id>/admin/employee/admin_employee_show.xhtml</to-view-id>
+			<from-outcome>admin_show_contact</from-outcome>
+			<to-view-id>/admin/contact/admin_contact_show.xhtml</to-view-id>
 		</navigation-case>
 		<navigation-case>
 			<from-outcome>admin_assign_department_employee</from-outcome>
@@ -906,6 +906,14 @@
 			<to-view-id>/admin/basic_data/admin_basic_data_show.xhtml</to-view-id>
 		</navigation-case>
 	</navigation-rule>
+	<navigation-rule>
+		<from-view-id>/admin/department/admin_department_edit.xhtml</from-view-id>
+		<navigation-case>
+			<from-outcome>admin_list_departments</from-outcome>
+			<to-view-id>/admin/department/admin_department_list.xhtml</to-view-id>
+			<redirect></redirect>
+		</navigation-case>
+	</navigation-rule>
 	<navigation-rule>
 		<from-view-id>/admin/employee/admin_employee_list.xhtml</from-view-id>
 		<navigation-case>
@@ -1038,7 +1046,7 @@
 		</navigation-case>
 		<navigation-case>
 			<from-outcome>admin_show_employee</from-outcome>
-			<to-view-id>/admin/company_employee/admin_company_employee_show.xhtml</to-view-id>
+			<to-view-id>/admin/employee/admin_employee_show.xhtml</to-view-id>
 		</navigation-case>
 		<navigation-case>
 			<from-outcome>admin_assign_receipt_seller</from-outcome>
diff --git a/web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl b/web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl
index 5a0557a9..769aef85 100644
--- a/web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl
+++ b/web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl
@@ -8,11 +8,11 @@
 	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
 	xmlns:p="http://primefaces.org/ui"
 	>
-
-	<!--
-	@TODO title="#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND_TITLE}"
-	-->
-	<p:fieldset legend="#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND}" rendered="#{empty rendered or rendered}">
+	<p:fieldset
+		legend="#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND}"
+		title="#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND_TITLE}"
+		rendered="#{empty rendered or rendered}"
+		>
 		<p:panelGrid
 			layout="grid"
 			columns="2"
diff --git a/web/WEB-INF/resources/tags/admin/form_data/user/admin_form_user_data.tpl b/web/WEB-INF/resources/tags/admin/form_data/user/admin_form_user_data.tpl
index c551f289..4028b2fb 100644
--- a/web/WEB-INF/resources/tags/admin/form_data/user/admin_form_user_data.tpl
+++ b/web/WEB-INF/resources/tags/admin/form_data/user/admin_form_user_data.tpl
@@ -8,57 +8,59 @@
 	xmlns:p="http://primefaces.org/ui"
 	>
 
-	<!--
-	@TODO title="#{msg.ADMIN_USER_DATA_EMAIL_LEGEND_TITLE}"
-	-->
-	<ui:fragment rendered="#{not empty mode}">
-		<p:fieldset legend="#{msg.ADMIN_USER_DATA_EMAIL_LEGEND}">
-			<p:panelGrid
-				columns="2"
-				columnClasses="ui-grid-col-4,ui-grid-col-8"
-				styleClass="ui-noborder"
-				>
-				<p:outputLabel for="userName" value="#{msg.ADMIN_PERSONAL_DATA_ENTER_USER_NAME}" />
-				<p:inputText id="userName" size="20" maxlength="255" value="#{adminUserController.userName}" required="true" requiredMessage="#{msg.ADMIN_USER_NAME_IS_REQUIRED}" />
+	<p:fieldset
+		legend="#{msg.ADMIN_USER_DATA_EMAIL_LEGEND}"
+		title="#{msg.ADMIN_USER_DATA_EMAIL_LEGEND_TITLE}"
+		rendered="#{not empty mode}"
+		>
+		<p:panelGrid
+			columns="2"
+			columnClasses="ui-grid-col-4,ui-grid-col-8"
+			styleClass="ui-noborder"
+			>
+			<p:outputLabel for="userName" value="#{msg.ADMIN_PERSONAL_DATA_ENTER_USER_NAME}" />
+			<p:inputText id="userName" size="20" maxlength="255" value="#{adminUserController.userName}" required="true" requiredMessage="#{msg.ADMIN_USER_NAME_IS_REQUIRED}" />
 
-				<p:outputLabel for="userPassword" value="#{msg.ADMIN_USER_DATA_ENTER_PASSWORD}" />
-				<p:inputText type="password" id="userPassword" size="10" maxlength="255" value="#{adminUserController.userPassword}" />
+			<p:outputLabel for="userPassword" value="#{msg.ADMIN_USER_DATA_ENTER_PASSWORD}" />
+			<p:inputText type="password" id="userPassword" size="10" maxlength="255" value="#{adminUserController.userPassword}" />
 
-				<p:outputLabel for="userPasswordRepeat" value="#{msg.ADMIN_USER_DATA_ENTER_PASSWORD_REPEAT}" />
-				<p:inputText type="password" id="userPasswordRepeat" size="10" maxlength="255" value="#{adminUserController.userPasswordRepeat}" />
+			<p:outputLabel for="userPasswordRepeat" value="#{msg.ADMIN_USER_DATA_ENTER_PASSWORD_REPEAT}" />
+			<p:inputText type="password" id="userPasswordRepeat" size="10" maxlength="255" value="#{adminUserController.userPasswordRepeat}" />
 
-				<p:outputLabel for="userMustChangePassword" value="#{msg.ADMIN_USER_MUST_CHANGE_PASSWORD}" />
-				<p:selectBooleanCheckbox id="userMustChangePassword" value="#{adminUserController.userMustChangePassword}" />
+			<p:outputLabel for="userMustChangePassword" value="#{msg.ADMIN_USER_MUST_CHANGE_PASSWORD}" />
+			<p:selectBooleanCheckbox id="userMustChangePassword" value="#{adminUserController.userMustChangePassword}" />
 
-				<p:outputLabel for="userProfileMode" value="#{msg.ADMIN_SELECT_USER_PROFILE_MODE}" />
-				<p:selectOneMenu
-					id="userProfileMode"
-					value="#{adminUserController.userProfileMode}"
-					filter="true"
-					filterMatchMode="contains"
-					>
+			<p:outputLabel for="userProfileMode" value="#{msg.ADMIN_SELECT_USER_PROFILE_MODE}" />
+			<p:selectOneMenu
+				id="userProfileMode"
+				value="#{adminUserController.userProfileMode}"
+				filter="true"
+				filterMatchMode="contains"
+				>
 
-					<f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
+				<f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
 
-					<f:selectItems
-						value="#{dataController.profileModes}"
-						var="profileMode"
-						itemValue="#{profileMode}"
-						itemLabel="#{msg[profileMode.messageKey]}"
-						/>
-				</p:selectOneMenu>
-			</p:panelGrid>
-		</p:fieldset>
+				<f:selectItems
+					value="#{dataController.profileModes}"
+					var="profileMode"
+					itemValue="#{profileMode}"
+					itemLabel="#{msg[profileMode.messageKey]}"
+					/>
+			</p:selectOneMenu>
+		</p:panelGrid>
+	</p:fieldset>
 
-		<h:panelGroup styleClass="para notice" layout="block">
-			<ul>
-				<li><h:outputText value="#{msg.ADMIN_USER_DATA_USER_NAME_NOTICE}" /></li>
+	<p:fieldset
+		legend="#{msg.ADMIN_USER_DATA_NOTICES_LEGEND}"
+		rendered="#{not empty mode}"
+		>
+		<ul>
+			<li><h:outputText value="#{msg.ADMIN_USER_DATA_USER_NAME_NOTICE}" /></li>
 
-				<li>
-					<h:outputText value="#{msg.ADMIN_USER_DATA_PASSWORD_EDIT_NOTICE}" rendered="#{mode == 'edit'}" />
-					<h:outputText value="#{msg.ADMIN_USER_DATA_PASSWORD_ADD_NOTICE}" rendered="#{mode == 'add'}" />
-				</li>
-			</ul>
-		</h:panelGroup>
-	</ui:fragment>
+			<li>
+				<h:outputText value="#{msg.ADMIN_USER_DATA_PASSWORD_EDIT_NOTICE}" rendered="#{mode == 'edit'}" />
+				<h:outputText value="#{msg.ADMIN_USER_DATA_PASSWORD_ADD_NOTICE}" rendered="#{mode == 'add'}" />
+			</li>
+		</ul>
+	</p:fieldset>
 </ui:composition>
diff --git a/web/WEB-INF/templates/admin/branch_office/admin_form_branch_office_data.tpl b/web/WEB-INF/templates/admin/branch_office/admin_form_branch_office_data.tpl
index 8cc47ec8..2864d093 100644
--- a/web/WEB-INF/templates/admin/branch_office/admin_form_branch_office_data.tpl
+++ b/web/WEB-INF/templates/admin/branch_office/admin_form_branch_office_data.tpl
@@ -48,15 +48,15 @@
 				filterMatchMode="contains"
 				>
 
-				<f:converter converterId="EmployeeConverter" />
+				<f:converter converterId="ContactConverter" />
 
 				<f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
 
 				<f:selectItems
-					value="#{employeeListController.allEmployees}"
-					var="companyEmployee"
-					itemValue="#{companyEmployee}"
-					itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
+					value="#{contactListController.allContacts}"
+					var="contact"
+					itemValue="#{contact}"
+					itemLabel="#{beanHelper.renderContact(contact)}"
 					/>
 			</p:selectOneMenu>
 
@@ -68,15 +68,15 @@
 				filterMatchMode="contains"
 				>
 
-				<f:converter converterId="EmployeeConverter" />
+				<f:converter converterId="ContactConverter" />
 
 				<f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
 
 				<f:selectItems
-					value="#{employeeListController.allEmployees}"
-					var="companyEmployee"
-					itemValue="#{companyEmployee}"
-					itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
+					value="#{contactListController.allContacts}"
+					var="contact"
+					itemValue="#{contact}"
+					itemLabel="#{beanHelper.renderContact(contact)}"
 					/>
 			</p:selectOneMenu>
 
diff --git a/web/WEB-INF/templates/admin/department/admin_form_department_data.tpl b/web/WEB-INF/templates/admin/department/admin_form_department_data.tpl
index 2a8e99ba..0ef2e0d8 100644
--- a/web/WEB-INF/templates/admin/department/admin_form_department_data.tpl
+++ b/web/WEB-INF/templates/admin/department/admin_form_department_data.tpl
@@ -20,7 +20,7 @@
 			<p:inputText
 				id="departmentI18nKey"
 				maxlength="255"
-				value="#{adminDepartmentController.departmentI18nKey}"
+				value="#{adminDepartmentActionController.departmentI18nKey}"
 				required="true"
 				requiredMessage="#{msg.ADMIN_DEPARTMENT_I18N_KEY_REQUIRED}"
 				/>
@@ -28,7 +28,7 @@
 			<p:outputLabel for="departmentCompany" value="#{msg.ADMIN_ASSIGN_DEPARTMENT_COMPANY}" />
 			<p:selectOneMenu
 				id="departmentCompany"
-				value="#{adminDepartmentController.departmentCompany}"
+				value="#{adminDepartmentActionController.departmentCompany}"
 				filter="true"
 				filterMatchMode="contains"
 				required="true"
@@ -50,7 +50,7 @@
 			<p:outputLabel for="departmentBranchOffice" value="#{msg.ADMIN_ASSIGN_DEPARTMENT_BRANCH_OFFICE}" />
 			<p:selectOneMenu
 				id="departmentBranchOffice"
-				value="#{adminDepartmentController.departmentBranchOffice}"
+				value="#{adminDepartmentActionController.departmentBranchOffice}"
 				filter="true"
 				filterMatchMode="contains"
 				>
@@ -69,7 +69,7 @@
 			<p:outputLabel for="departmentHeadquarter" value="#{msg.ADMIN_ASSIGN_DEPARTMENT_HEADQUARTER}" />
 			<p:selectOneMenu
 				id="departmentHeadquarter"
-				value="#{adminDepartmentController.departmentHeadquarter}"
+				value="#{adminDepartmentActionController.departmentHeadquarter}"
 				filter="true"
 				filterMatchMode="contains"
 				>
@@ -89,7 +89,7 @@
 			<p:outputLabel for="departmentLead" value="#{msg.ADMIN_ASSIGN_DEPARTMENT_LEAD_EMPLOYEE}" />
 			<p:selectOneMenu
 				id="departmentLead"
-				value="#{adminDepartmentController.departmentLead}"
+				value="#{adminDepartmentActionController.departmentLead}"
 				filter="true"
 				filterMatchMode="contains"
 				>
@@ -99,17 +99,17 @@
 				<f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
 
 				<f:selectItems
-					value="#{employeeListController.allEmployees}"
-					var="employee"
-					itemValue="#{employee}"
-					itemLabel="#{beanHelper.renderEmployee(employee, false)}"
+					value="#{contactListController.allContacts}"
+					var="contact"
+					itemValue="#{contact}"
+					itemLabel="#{beanHelper.renderContact(contact)}"
 					/>
 			</p:selectOneMenu>
 
 			<p:outputLabel for="departmentUserOwner" value="#{msg.ADMIN_ASSIGN_DEPARTMENT_USER_OWNER}" />
 			<p:selectOneMenu
 				id="departmentUserOwner"
-				value="#{adminDepartmentController.departmentUserOwner}"
+				value="#{adminDepartmentActionController.departmentUserOwner}"
 				filter="true"
 				filterMatchMode="contains"
 				>
diff --git a/web/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl b/web/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl
index 681eb66f..47c59420 100644
--- a/web/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl
+++ b/web/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl
@@ -1,7 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!--
-@TODO title="#{msg.ADMIN_EMPLOYEE_GENERAL_LEGEND_TITLE}"
--->
 <ui:composition
 	xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:core="http://mxchange.org/jsf/core/widgets"
@@ -11,7 +8,10 @@
 	xmlns:p="http://primefaces.org/ui"
 	>
 
-	<p:fieldset legend="#{msg.ADMIN_EMPLOYEE_GENERAL_LEGEND}">
+	<p:fieldset
+		legend="#{msg.ADMIN_EMPLOYEE_GENERAL_LEGEND}"
+		title="#{msg.ADMIN_EMPLOYEE_GENERAL_LEGEND_TITLE}"
+		>
 		<p:panelGrid
 			layout="grid"
 			columns="2"
@@ -121,10 +121,10 @@
 		</p:panelGrid>
 	</p:fieldset>
 
-	<!--
-	@TODO title="#{msg.ADMIN_EMPLOYEE_OTHER_LEGEND_TITLE}"
-	-->
-	<p:fieldset legend="#{msg.ADMIN_EMPLOYEE_OTHER_LEGEND}">
+	<p:fieldset
+		legend="#{msg.ADMIN_EMPLOYEE_OTHER_LEGEND}"
+		title="#{msg.ADMIN_EMPLOYEE_OTHER_LEGEND_TITLE}"
+		>
 		<p:panelGrid
 			layout="grid"
 			columns="2"
diff --git a/web/WEB-INF/templates/admin/headquarter/admin_form_headquarter.tpl b/web/WEB-INF/templates/admin/headquarter/admin_form_headquarter.tpl
index 5035f119..39970174 100644
--- a/web/WEB-INF/templates/admin/headquarter/admin_form_headquarter.tpl
+++ b/web/WEB-INF/templates/admin/headquarter/admin_form_headquarter.tpl
@@ -39,15 +39,15 @@
 				filterMatchMode="contains"
 				>
 
-				<f:converter converterId="EmployeeConverter" />
+				<f:converter converterId="ContactConverter" />
 
 				<f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
 
 				<f:selectItems
-					value="#{employeeListController.allEmployees}"
-					var="companyEmployee"
-					itemValue="#{companyEmployee}"
-					itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
+					value="#{contactListController.allContacts}"
+					var="contact"
+					itemValue="#{contact}"
+					itemLabel="#{beanHelper.renderContact(contact)}"
 					/>
 			</p:selectOneMenu>
 
diff --git a/web/admin/branch_office/admin_branch_office_list.xhtml b/web/admin/branch_office/admin_branch_office_list.xhtml
index f491f4d0..3eb65bed 100644
--- a/web/admin/branch_office/admin_branch_office_list.xhtml
+++ b/web/admin/branch_office/admin_branch_office_list.xhtml
@@ -234,28 +234,28 @@
 							updateLabel="true"
 							title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
 							>
-							<f:converter converterId="EmployeeConverter" />
+							<f:converter converterId="ContactConverter" />
 
 							<f:selectItems
-								value="#{employeeListController.allEmployees}"
-								var="employee"
-								itemValue="#{employee}"
-								itemLabel="#{beanHelper.renderEmployee(employee, false)}"
+								value="#{contactListController.allContacts}"
+								var="contact"
+								itemValue="#{contact}"
+								itemLabel="#{beanHelper.renderContact(contact)}"
 								/>
 						</p:selectCheckboxMenu>
 					</f:facet>
 
 					<p:link
-						outcome="admin_show_employee"
-						value="#{beanHelper.renderEmployee(branchOffice.branchContactEmployee, false)}"
+						outcome="admin_show_contact"
+						value="#{beanHelper.renderContact(branchOffice.branchContactEmployee)}"
 						title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}"
 						rendered="#{not empty branchOffice.branchContactEmployee}"
 						>
-						<f:param name="employeeId" value="#{branchOffice.branchContactEmployee.employeeId}" />
+						<f:param name="contactId" value="#{branchOffice.branchContactEmployee.contactId}" />
 					</p:link>
 
 					<p:link
-						outcome="admin_assign_branch_office_employee"
+						outcome="admin_assign_branch_office_contact"
 						value="#{msg.ADMIN_LINK_ASSIGN}"
 						title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_CONTACT_PERSON_TITLE}"
 						rendered="#{empty branchOffice.branchContactEmployee}"
@@ -358,25 +358,25 @@
 
 								<p:outputLabel value="#{msg.ASSIGNED_CONTACT_PERSON_HEADER}" title="#{msg.ASSIGNED_CONTACT_PERSON_TO_BRANCH_OFFICE_TITLE}" />
 								<p:link
-									outcome="admin_show_employee"
+									outcome="admin_show_contact"
 									target="_blank"
-									value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchContactEmployee, true)}"
+									value="#{beanHelper.renderContact(branchOfficeListController.selectedBranchOffice.branchContactEmployee)}"
 									title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}"
 									rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}"
 									>
-									<f:param name="employeeId" value="#{branchOfficeListController.selectedBranchOffice.branchContactEmployee.employeeId}" />
+									<f:param name="contactId" value="#{branchOfficeListController.selectedBranchOffice.branchContactEmployee.contactId}" />
 								</p:link>
 								<h:outputText value="#{msg.NO_CONTACT_EMPLOYEE_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}" />
 
 								<p:outputLabel value="#{msg.ASSIGNED_OWNER_EMPLOYEE_HEADER}" title="#{msg.ASSIGNED_OWNER_EMPLOYEE_TO_BRANCH_OFFICE_TITLE}" />
 								<p:link
-									outcome="admin_show_employee"
+									outcome="admin_show_contact"
 									target="_blank"
-									value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchOwnerEmployee, true)}"
+									value="#{beanHelper.renderContact(branchOfficeListController.selectedBranchOffice.branchOwnerEmployee)}"
 									title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_EMPLOYEE_TITLE}"
 									rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}"
 									>
-									<f:param name="employeeId" value="#{branchOfficeListController.selectedBranchOffice.branchContactEmployee.employeeId}" />
+									<f:param name="contactId" value="#{branchOfficeListController.selectedBranchOffice.branchContactEmployee.contactId}" />
 								</p:link>
 								<h:outputText value="#{msg.NO_OWNER_EMPLOYEE_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}" />
 
diff --git a/web/admin/department/admin_department_edit.xhtml b/web/admin/department/admin_department_edit.xhtml
new file mode 100644
index 00000000..fd1917db
--- /dev/null
+++ b/web/admin/department/admin_department_edit.xhtml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+	template="/WEB-INF/templates/admin/admin_base.tpl"
+	xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+	xmlns:h="http://xmlns.jcp.org/jsf/html"
+	xmlns:f="http://xmlns.jcp.org/jsf/core"
+	xmlns:p="http://primefaces.org/ui"
+	>
+
+	<ui:define name="metadata">
+		<f:metadata>
+			<f:viewParam
+				name="departmentId"
+				value="#{adminDepartmentActionController.currentDepartment}"
+				converter="DepartmentConverter"
+				required="true"
+				requiredMessage="#{msg.ERROR_PARAMETER_DEPARTMENT_ID_NOT_SET}"
+				converterMessage="#{msg.PARAMETER_DEPARTMENT_ID_INVALID}"
+				/>
+
+			<f:viewAction
+				action="#{adminDepartmentActionController.copyAllDepartmentProperties()}"
+				/>
+		</f:metadata>
+	</ui:define>
+
+	<ui:define name="document_admin_title">
+		<h:outputText value="#{msg.PAGE_TITLE_ADMIN_EDIT_DEPARTMENT}" />
+	</ui:define>
+
+	<ui:define name="content_header">
+		<h:outputText value="#{msg.CONTENT_TITLE_ADMIN_EDIT_DEPARTMENT}" />
+	</ui:define>
+
+	<ui:define name="content">
+		<h:form
+			id="form-admin-edit-department"
+			rendered="#{not empty adminDepartmentActionController.currentDepartment}"
+			>
+			<h:inputHidden value="#{adminDepartmentActionController.departmentId}" />
+
+			<p:panelGrid
+				columns="1"
+				layout="grid"
+				>
+				<f:facet name="header">
+					<h:outputFormat
+						value="#{msg.ADMIN_EDIT_DEPARTMENT_TITLE}"
+						title="#{beanHelper.renderDepartment(adminDepartmentActionController.currentDepartment, false)}"
+						>
+						<f:param value="#{local[adminDepartmentActionController.departmentI18nKey]}" />
+						<f:param value="#{adminDepartmentActionController.departmentId}" />
+					</h:outputFormat>
+				</f:facet>
+
+				<h:panelGroup styleClass="para" layout="block">
+					<h:outputText value="#{msg.ADMIN_DEPARTMENT_MINIMUM_DATA}" />
+				</h:panelGroup>
+
+				<ui:include src="/WEB-INF/templates/admin/department/admin_form_department_data.tpl" />
+
+				<f:facet name="footer">
+					<p:panelGrid columns="2" layout="grid">
+						<p:commandButton
+							type="reset"
+							value="#{msg.BUTTON_RESET_FORM}"
+							/>
+
+						<p:commandButton
+							type="submit"
+							value="#{msg.BUTTON_ADMIN_EDIT_DEPARTMENT}"
+							action="#{adminDepartmentActionController.updateDepartment()}"
+							/>
+					</p:panelGrid>
+				</f:facet>
+			</p:panelGrid>
+		</h:form>
+	</ui:define>
+</ui:composition>
diff --git a/web/admin/department/admin_department_list.xhtml b/web/admin/department/admin_department_list.xhtml
index 807e1628..f64afc28 100644
--- a/web/admin/department/admin_department_list.xhtml
+++ b/web/admin/department/admin_department_list.xhtml
@@ -192,7 +192,7 @@
 
 				<p:column
 					headerText="#{msg.ADMIN_DEPARTMENT_LEAD_EMPLOYEE}"
-					sortBy="#{department.departmentLead.employeePersonalData.contactFamilyName}"
+					sortBy="#{department.departmentLead.contactFamilyName}"
 					filterBy="#{department.departmentLead}"
 					filterMatchMode="in"
 					>
@@ -205,30 +205,30 @@
 							updateLabel="true"
 							title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
 							>
-							<f:converter converterId="EmployeeConverter" />
+							<f:converter converterId="ContactConverter" />
 
 							<f:selectItems
-								value="#{employeeListController.allEmployees}"
-								var="employee"
-								itemValue="#{employee}"
-								itemLabel="#{beanHelper.renderEmployee(employee, false, false)}"
+								value="#{contactListController.allContacts}"
+								var="contact"
+								itemValue="#{contact}"
+								itemLabel="#{beanHelper.renderContact(contact)}"
 								/>
 						</p:selectCheckboxMenu>
 					</f:facet>
 
 					<p:link
-						outcome="admin_show_employee"
-						value="#{beanHelper.renderEmployee(department.departmentLead, true)}"
-						title="#{msg.ADMIN_LINK_SHOW_DEPARTMENT_LEAD_EMPLOYEE_TITLE}"
+						outcome="admin_show_contact"
+						value="#{beanHelper.renderContact(department.departmentLead)}"
+						title="#{msg.ADMIN_LINK_SHOW_DEPARTMENT_LEAD_CONTACT_TITLE}"
 						rendered="#{not empty department.departmentLead}"
 						>
-						<f:param name="employeeId" value="#{department.departmentLead.employeeId}" />
+						<f:param name="contactId" value="#{department.departmentLead.contactId}" />
 					</p:link>
 
 					<p:link
-						outcome="admin_assign_department_employee"
+						outcome="admin_assign_department_lead"
 						value="#{msg.ADMIN_LINK_ASSIGN}"
-						title="#{msg.ADMIN_LINK_ASSIGN_DEPARTMENTS_LEAD_EMPLOYEE_TITLE}"
+						title="#{msg.ADMIN_LINK_ASSIGN_DEPARTMENTS_LEAD_CONTACT_TITLE}"
 						rendered="#{empty department.departmentLead}"
 						>
 						<f:param name="departmentId" value="#{department.departmentId}" />
@@ -387,7 +387,7 @@
 						<p:commandButton
 							type="submit"
 							value="#{msg.BUTTON_ADMIN_ADD_DEPARTMENT_DATA}"
-							action="#{adminDepartmentController.addDepartment()}"
+							action="#{adminDepartmentActionController.addDepartment()}"
 							update="form-list-departments:departmentList"
 							/>
 					</p:panelGrid>
diff --git a/web/admin/headquarter/admin_headquarter_list.xhtml b/web/admin/headquarter/admin_headquarter_list.xhtml
index f8f18a88..c19e0f27 100644
--- a/web/admin/headquarter/admin_headquarter_list.xhtml
+++ b/web/admin/headquarter/admin_headquarter_list.xhtml
@@ -2,7 +2,6 @@
 <ui:composition
 	template="/WEB-INF/templates/admin/admin_base.tpl"
 	xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:links="http://mxchange.org/jsf/core/links"
 	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
 	xmlns:h="http://xmlns.jcp.org/jsf/html"
 	xmlns:f="http://xmlns.jcp.org/jsf/core"
@@ -186,28 +185,28 @@
 							updateLabel="true"
 							title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
 							>
-							<f:converter converterId="EmployeeConverter" />
+							<f:converter converterId="ContactConverter" />
 
 							<f:selectItems
-								value="#{employeeListController.allEmployees}"
-								var="employee"
-								itemValue="#{employee}"
-								itemLabel="#{beanHelper.renderEmployee(employee, false)}"
+								value="#{contactListController.allContacts}"
+								var="contact"
+								itemValue="#{contact}"
+								itemLabel="#{beanHelper.renderContact(contact)}"
 								/>
 						</p:selectCheckboxMenu>
 					</f:facet>
 
 					<p:link
-						outcome="admin_show_employee"
-						value="#{beanHelper.renderEmployee(headquarter.headquarterContactEmployee, false)}"
+						outcome="admin_show_contact"
+						value="#{beanHelper.renderContact(headquarter.headquarterContactEmployee)}"
 						title="#{msg.ADMIN_LINK_SHOW_HEADQUARTER_CONTACT_PERSON_TITLE}"
 						rendered="#{not empty headquarter.headquarterContactEmployee}"
 						>
-						<f:param name="employeeId" value="#{headquarter.headquarterContactEmployee.employeeId}" />
+						<f:param name="contactId" value="#{headquarter.headquarterContactEmployee.contactId}" />
 					</p:link>
 
 					<p:link
-						outcome="admin_assign_headquarter_employee"
+						outcome="admin_assign_headquarter_contact"
 						value="#{msg.ADMIN_LINK_ASSIGN}"
 						title="#{msg.ADMIN_LINK_ASSIGN_HEADQUARTER_CONTACT_PERSON_TITLE}"
 						rendered="#{empty headquarter.headquarterContactEmployee}"
diff --git a/web/admin/user/admin_user_list.xhtml b/web/admin/user/admin_user_list.xhtml
index 884aae50..a3fed78d 100644
--- a/web/admin/user/admin_user_list.xhtml
+++ b/web/admin/user/admin_user_list.xhtml
@@ -305,11 +305,10 @@
 					<h:outputText value="#{msg.ADMIN_ADD_USER_TITLE}" />
 				</f:facet>
 
-				<!-- Whether select contact data .. //-->
-				<!--
-				@TODO title="#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND_TITLE}"
-				-->
-				<p:fieldset legend="#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND}">
+				<p:fieldset
+					legend="#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND}"
+					title="#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND_TITLE}"
+					>
 					<p:panelGrid
 						columns="2"
 						columnClasses="ui-grid-col-3,ui-grid-col-9"
-- 
2.39.5