aspose file tools*
The moose likes Struts and the fly likes Struts2 + display tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 + display tag" Watch "Struts2 + display tag" New topic
Author

Struts2 + display tag

Sudhakar Duraiswamy
Ranch Hand

Joined: Dec 20, 2007
Posts: 43
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:


Sudhakar
SCJP 5.0 93%| SCWCD (prep. ongoing))
Jesus Mireles
Ranch Hand

Joined: Mar 10, 2010
Posts: 122

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2 + display tag
 
Similar Threads
Pagination using display tag and JSTL.Display problem
css,images,fonts gets dissappeared after submitting the form.
pagination problem
problem with display table pagination and sorting
pagination problem + struts1.3