Win a copy of Programmers Guide to Apache Thrift this week in the Open Source 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:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Struts2 + display tag  RSS feed

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am evaluating Display Tag , to see if it fits our pagination requirements.

If you observe the following snippet , the pagination works as intended as mentioned in the site .
But for every page link clicked the request is sent to action class and the execute method is fired again.

My Queries
1. Is there a way to avoid calling of execute method for each page click .As i would be fetching the entire list the first time when the page loads


I tried investigating on this , not much of luck ? Or am i missing something obvious


Can anyone please help me out here.

Reference : http://javateacher.co.in/misc-frameworks/struts-2-x/struts2-pagination-using-display-tag/

Action Class



JSP:
 
Ranch Hand
Posts: 122
IntelliJ IDE Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could put the list in a static field if its always going to be static. If not you can also use wildcard mapping for the methods in your action.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!