• 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

How to get displayed records on current page into separate List?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to get displayed records on current page into separate List??

I have displayed 100 records using display tags library. i have format like <First/Prev>1 2 3....<Next/Last>

so when i click on 2, i will get certain records per page and i want to store/fetch/pull those records into separate List..

looking forward

thanks
uday
 
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

hi,

If you are using display tag then you can not get list while you are going from 1 to 2 page or any other.

Because display tag was made using custom tag. So, they have their mechanism to get result to another page and iterate your list.

So, on click their pagination link you can not get result i think.

But i might be wrong.

 
uday batta
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is there any possibility to get and/or put those records in a session object..?

all i want to do is get the currently displayed records on a certain page into separate List/Object and i can use those records for further use...

is there any alternative way to achieve???
 
Nishan Patel
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

hi,

I think yes,

at the time your display tag iteration add every element in one session oblect.

Create one list which contains id of your displayed record.

At the time of you use <display:column add id to created list and at last just add this list to session.

That's way you can get id of your list and then if you want record you have to get it again form database.

>
 
uday batta
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

can you suggest me the code and where to place the code

looking forward.

thanks
uday
 
Sheriff
Posts: 67746
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
Have you checked the JSP FAQ entry on this very subject?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic