* @param req
* @return
*/
public AdminEmployeeDetailsView getEmployeeDetailsView() {
AdminEmployeeDetailsView ev = new AdminEmployeeDetailsView(getMainAdminView());
Employee e = getEmployee();
if (e != null) {
ev.setEmployee(e);
ev.addContentView(new ContentView(JSP_EMPLOYEE_DETAILS, "Employee "+e.getId()));
}
else {
ev.addContentView(new ContentView(JSP_MESSAGE, "Not Found"));
ev.setMessage("Sorry, employee not found.");
}
Collection<EmployeeRoles> roles = e.getRoles();
for (EmployeeRoles role : roles) {
ev.addRole(role.getRole().getDescription());
}
return ev;
}