Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Multi page data view  RSS feed

 
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have developed a custom tag with java tag libraries.

This tag retrieves data from the database and shows the data as a table.

Sometimes, the selected data size to huge, which is not a good practice to view it all in one page.

Is there a specific component (or code) that let's me divide the the selected data into chunks and provide the user with links to the chunks so that when the user clicks on one, it will automatically show that selected part of data.

I guess that this probably has to be done using JavaScript.

Thanks in advance ...
[ March 14, 2008: Message edited by: Bear Bibeault ]
 
Author and ninkuma
Marshal
Posts: 66799
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Vassili Vladimir:
I guess that this probably has to be done using JavaScript.

No. In fact, JavaScript is a very poor choice for this.

Moved to the JSP forum.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66799
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This type of "paging" is best done at the database layer. See this JSP FAQ entry for more information.
[ March 13, 2008: Message edited by: Bear Bibeault ]
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But what I'm trying to do is not the paging in the database layer only.

I the view layer to page the result as tabs (or something similar).

Regards,
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Vassili Vladimir:
But what I'm trying to do is not the paging in the database layer only.

I the view layer to page the result as tabs (or something similar).



Its nothing different. You can present the result in whatever way you like. Here in this case you are not doing it using the typical pages way i.e. "page 1 2 3 4 5 .." or neither using "<< previous next >>" way, but using tabs. So, what. Its nothing different as far as logic concerns. You can think of a tab as "next" and "previous" thingy. Or better think of it as pages. Where page 1 would be your first tab, and page 2 would be your second and so on ...

Cheers.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!