?
Solved

JSTL DisplayTag Back Button Issue

Posted on 2013-01-31
3
Medium Priority
?
855 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 1000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Suggested Courses

765 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