• 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

paging

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hii,

I am trying to do paging in a jsp with the http://jsptags.com/tags/navigation/pager/index.jsp tag .

In my pg:item i have a logic:iterate tag in request scope, i am unable to display all the pages properly. Anybody faced similiar problems.
[ August 16, 2007: Message edited by: Kiaama Liames ]
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, the best thing to use for paging in the SourceForge display tag. It's very easy to use and takes all the pain out of paging in the front-end part of your application. See http://displaytag.sourceforge.net/11/ and http://displaytag.sourceforge.net/11/tut_basic.html (usage tutorial)

Essentially, in your action store your Collection/list (called myList for example) in the request (or session). In your jsp, include the display tag library at the top of your jsp (like you would with other included libraries), then do something like in your JSP:

<display:table name="myList" />

the above is the most basic usage. you can customize it as you wish (see the above links).

hope this helps..
 
Ranch Hand
Posts: 330
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
+1.

i've used displaytag in another project and its very easy to implement.
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My current project uses the Pager Tag library. It is reasonably easy to integrate. What exactly does "i am unable to display all the pages properly" mean? If you remove the pager tags does your page display?

I will admit that just this week I have been looking for an alternate solution. Implementing paging at the JSP level is okay for even reasonably large datasets, but it is not the most efficient solution. I am also looking for more of an Ajax type solution so users do not have to watch the entire page refresh each time the navigate to the next page of records.

While we are talking about paging...here is a link with some interesting thoughts...that a smart scrolling solution is better than paging:
http://looksgoodworkswell.blogspot.com/2005/06/death-to-paging-rico-livegrid-released.html

- Brent
 
dennis zined
Ranch Hand
Posts: 330
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Brent Sterling:
My current project uses the Pager Tag library. It is reasonably easy to integrate. What exactly does "i am unable to display all the pages properly" mean? If you remove the pager tags does your page display?

I will admit that just this week I have been looking for an alternate solution. Implementing paging at the JSP level is okay for even reasonably large datasets, but it is not the most efficient solution. I am also looking for more of an Ajax type solution so users do not have to watch the entire page refresh each time the navigate to the next page of records.

While we are talking about paging...here is a link with some interesting thoughts...that a smart scrolling solution is better than paging:
http://looksgoodworkswell.blogspot.com/2005/06/death-to-paging-rico-livegrid-released.html

- Brent



dang! I have got to take a look at that one...nice post.
 
Kiaama Liames
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hii Brent,

My current project uses the Pager Tag library. It is reasonably easy to integrate. What exactly does "i am unable to display all the pages properly" mean? If you remove the pager tags does your page display?



What i meant was i am getting an empty data grid, when i access the subsequent pages. The first page works fine,it loads the data and the page, but when i try to access the subsequent pages , an empty data grid is shown.
 
Kiaama Liames
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hii,

Anybody using pager-taglib facing similiar problems , ...
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you doing something to store the data between pages? My project went with the simplest approach of making another round trip to the database to execute the query again. What are you using for your url property?

- Brent
 
Kiaama Liames
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My problem got solved, minor issue with scope

Thanks
 
Bras cause cancer. And tiny ads:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic