DisplayTag/Struts/Spring/Hibernate + Lots of data
I've been working on a project for sometime with just a very small set of test data while developing. Anyway, I just imported actual data for some preliminary system testing and one of my 'list' pages using DisplayTag for presenting and paginating data ground to almost a halt.....
Thousands of objects in a collection, dropped into the request object and being loaded up in DisplayTag. I really like the pagination functionality in DisplayTag but didn't want to have DisplayTag take all my data in one go.
I knew I had a lot of means to skin this cat. Find another tag library... Write my own tag library... I did know, however, that DisplayTag's pagination supported requests on sets of data per page refresh. So that's what I decided to do.
At the same time I knew there was pagination support in Hibernate which I had never looked at.
Before coding from scratch I did a quick 'google' and found exactly what I needed to do on Matt Raible's website.
Raible Designs - DisplayTag And Hibernate Pagination
I have Spring inject service classes into my actions but basically, after some inspiration from the code in the link above, I was up and running very quickly and smoothly in no time.
Hooray for DisplayTag!!
And Matt Raible. :-)
Matt
Subscribe to:
Post Comments (Atom)
1 comments:
Hey,
I am trying to do thedisplaytag external pagination in Oracle AS but it is not working. Are you running your app in oc4j?
thanks
K
Post a Comment