• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Partial List Pagination with DisplayTag - Please help

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm having a small problem with the pagination message that displaytag is outputting for me. I'm performing pagination via the partialList method but the "displaying items X to Y" does not display correctly.

The flow is as follows:

1. user performs a search
2. query the database for the count of matching records
3. pull the correct records from the db based on the displaytag page number and number of items to be displayed at a time.
4. Set the list of items return into a dynamic struts form

However, say my query returns 15 records and we display 5 records at a time, the first page will display the message:

"15 Items found, displaying 1 to 5."

But if the user clicks onto page 2, then the same message is displayed (the row data, however, is paginated correctly).

Can anyone suggest what the problem exactly is here? PartialList is set to true on the displaytag html tag.

Thanks,
Ger.
 
If a regular clown is funny, then a larger clown would be funnier. Math. Verified by this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic