• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Pagination With Spring MVC

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am trying to follow a tutorial on pagination using Spring MVC's PagedListHolder object. I am integreating it with my own controller class and thymeleaf view. The code is as follows:


StoreController




Thymeleaf View Page




ProductService



I get a fault in my controller @ line 16 " pagedListHolder = newPagedListHolder(productService.getByCategoryId()); " as my method call here is not the same as the method in ProductService @ line 8 " public List<Product> getByCategoryId(Byte id) { ", when I try and change it the PagedListHolder comes up with an unresolved fault.

Thanks in advance,
Regards,
Gus
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your ProductService#getByCategoryId method has a parm Byte id but in your controller you didn't pass one in.
 
reply
    Bookmark Topic Watch Topic
  • New Topic