• Post Reply Bookmark Topic Watch Topic
  • New Topic

the easiest way to handle pagination? ( NO displayTag)  RSS feed

 
Sammy Bill
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I m trying to handle pagination, where a user can perform a search and the result is displayed 10 products per page.
I don't want to use tables so No displayTag.

Any ideas?

I m using Struts, but i felt that this is more jsp than struts, so i posted it in jsp forum.
Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read the FAQ entry on this subject?
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

If you don't want to implement pagination with display tag then you have to implement it your own custom tag with your requirement.

Using sql query LIMIT attribute you can get record limited and just pass page number calculate your logic and change LIMIT range and get different data list.

Iterate that list to jsp and so on...

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nishan Patel wrote: then you have to implement it your own custom tag

No custom tags are required -- this can be implemented in a straight-forward manner if desired.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!