Solved

JSTL DisplayTag Back Button Issue

Posted on 2013-01-31
3
823 Views
Last Modified: 2013-03-27
I am using displaytag with Apache/Tomcat JSTL.  It has auto sorting.

Here's an example.
http://demo.displaytag.org/displaytag-examples-1.1/example-sorting.jsp

Problem is, if you click on columns to sort, that is considered an whole web page hit and makes using the back button difficult.  Everytime you sort, you have hit the Back button that many times to get to your original page.  I need the Back button to work because the pages are cached and faster to access.

I tried to use the following javascript to see if I can figure out a way to go back n number of times (n = number of times clicked on columns)
<INPUT TYPE="button" VALUE="Back" onClick="history.go(-1);">

Figuring out the number in the go method is difficult and I just couldn't get it to work.

Any ideas how to get Displaytag to work with Back button after sorting?  Anybody experienced this same problem?
0
Comment
Question by:lcor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 21

Accepted Solution

by:
Amitkumar Panchal earned 500 total points
ID: 38854041
That page says
When doing sorts, we copy the list into our own internally managed list, so that we don't change the ordering of the original list.
Please check the API if any method is available to get values in original order.

Page also suggests
You can also define the column to be sorted by default (if the user has not yet clicked on any sortable column) specifying the column index in the defaultsort attribute of the table tag. The default order can be set using the defaultorder attribute: the default value is ascending, you can set it to descending to reverse the order.
That can be an alternate, you can display the initial list by sorting any of the column.
0
 

Author Comment

by:lcor
ID: 38861888
What does this have to do with the back button issue?
0
 

Author Closing Comment

by:lcor
ID: 39025839
Although did not answer question, am rewarding points for being the only one to try and answer
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question