Search in sources :

Example 1 with CarMakeFilter

use of ua.springboot.web.domain.CarMakeFilter in project Logos_Materials_October_2017 by VolodymyrZavada.

the class CarController method showCarsByTitleFilter.

@GetMapping("/cars/search")
public String showCarsByTitleFilter(@PageableDefault Pageable pageable, Model model, @RequestParam("search") String search) {
    Page<Car> page = carService.findCarByMake(pageable, new CarMakeFilter(search));
    model.addAttribute("carsList", page.getContent());
    return "car/cars";
}
Also used : Car(ua.springboot.web.entity.Car) CarMakeFilter(ua.springboot.web.domain.CarMakeFilter) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Aggregations

GetMapping (org.springframework.web.bind.annotation.GetMapping)1 CarMakeFilter (ua.springboot.web.domain.CarMakeFilter)1 Car (ua.springboot.web.entity.Car)1