• 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

Paging records

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

Ive been researching how to implement paging in my JSP. I can allow a user to select teh number of records they want to display and then I need to implement this functionality. I will probably need to write a custom tag to do this but Im not overly sure. Could someone help me out?

Thanks,
Sarah
 
Saloon Keeper
Posts: 27884
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are a number of ways to do paged table displays. Custom tags work, Struts iterators work, I've done a number of things in straight Java over the years (some of them pretty ugly ), and most recently, there's an extended data table display in the apache MyFaces project that does multipage display.
 
Sarah Shay
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

So if I were to write a custom tag, how would I go about dividing my list? And displaying the particular pieces of it that I need? As in if a user hits on page 2, should I be going to my action class or should the custom tag handle it?
 
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sarah, this is a subject that has been discussed many times in this forum. Take a look back and you will find topics that address this issue.

My tactic has been to have the database do the dicing and slicing of the large dataset, rather than the UI layer. After all, why send data to the front end that is just going to be ignored?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic