• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic