public void createDepartment() {
if (departmentHandler.checkDepartmentName(getDepartmentName())) {
FacesContext.getCurrentInstance().addMessage("departmentHandlerMessages", new FacesMessage(FacesMessage.SEVERITY_ERROR, "Input Error", "Department already exists"));
} else {
departmentRef = new Department();
departmentRef.setDepartment(departmentName);
departmentHandler.createDepartment(departmentRef);
this.departmentName = "";
this.showCreate = 2;
FacesContext.getCurrentInstance().addMessage("departmentHandlerMessages", new FacesMessage(FacesMessage.SEVERITY_INFO, "Success.", "Department Created"));