* Method used for AJAX search requests on users, returning data in JSON format
*/
@RequestMapping(params = "searchForm", method = RequestMethod.POST, headers = "Accept=application/json")
public @ResponseBody List<EmployeeDto> searchAsyncForUsers(@RequestParam(value = "searchName") String searchName,
@RequestParam(value = "maxResults", required = false) Integer maxResults, HttpServletRequest request) {
Employee searchEmployee = new Employee();
searchEmployee.setUsername(searchName);
Iterator<Employee> usersIt = employeeService.findEntitiesByCriteria(searchEmployee, maxResults).iterator();
List<EmployeeDto> employeeDtoList = new ArrayList<EmployeeDto>();
while(usersIt.hasNext()) {
employeeDtoList.add(new EmployeeDto(usersIt.next()));
}