@RequestMapping(params = "searchForm", method = RequestMethod.POST, headers = "Accept=application/json")
public @ResponseBody List<SolutionDto> searchAsyncForSolutions(@RequestParam(value = "searchName") String searchName,
@RequestParam(value = "maxResults", required = false) Integer maxResults, HttpServletRequest request) {
Locale currentLocale = request.getLocale();
List<SolutionDto> solutionDtoList = new ArrayList<SolutionDto>();
Solution searchSolution = new Solution();
searchSolution.setInitialInfo(searchName);
searchSolution.setName(searchName);
Iterator<Solution> it = solutionService.findEntitiesByCriteria(searchSolution, maxResults).iterator();
while(it.hasNext()) {
solutionDtoList.add(new SolutionDto(it.next(), messageSource, currentLocale));
}
return solutionDtoList;