@RequestMapping("/console/directory/user/(*:id)/reportTo/assign/view")
public String consoleUserReportToAssign(ModelMap model, @RequestParam(value = "id") String id) {
User user = userDao.getUserById(id);
model.addAttribute("id", id);
if (user != null && user.getEmployments() != null && user.getEmployments().size() > 0) {
Employment e = (Employment) user.getEmployments().iterator().next();
Collection<Department> departments = directoryManager.getDepartmentsByOrganizationId(null, e.getOrganizationId(), "name", false, null, null);
Collection<Grade> grades = directoryManager.getGradesByOrganizationId(null, e.getOrganizationId(), "name", false, null, null);
model.addAttribute("organizationId", e.getOrganizationId());
model.addAttribute("departments", departments);
model.addAttribute("grades", grades);
}
return "console/directory/userReportToAssign";
}