use of ua.springboot.web.domain.CarFilter in project Logos_Materials_October_2017 by VolodymyrZavada.
the class CarController method showCarsByMake.
@GetMapping("/cars/filter")
public String showCarsByMake(@PageableDefault Pageable pageable, @RequestParam("search") String search, Model model) {
CarFilter filter = null;
if (search != null) {
filter = new CarFilter(search);
}
Page<Car> cars = carService.findAllCarsByMake(pageable, filter);
model.addAttribute("carsList", cars.getContent());
return "car/cars";
}
Aggregations