SODA Sheet Music

  • Increase font size
  • Default font size
  • Decrease font size
Home Miscellaneous Computer Programming and Co. My own fork of the Displaytag library

My own fork of the Displaytag library

E-mail

Hi,

Displaytag is a tag library for use in JSP in J2EE Web applications. The official page is here and it's a useful library when you want to make tables rapidly, with features like sorting, paging, even/odd lines with different colors, etc...

However there are missing features, and I saw that the SVN repository is a bit dead (last commit at June 2012). I wanted to add a new cool feature that I will describe here. Go check my Github Displaytag repository to get my fork with this new feature.

Feature description

You have paged results, say 20 pages listing 10 lines of results each, and you want to display all the results at once because you don't want to spend all the time searching through the 20 pages.

I added a "View all results" link next to the pages links if they exist: if you click on it, all the results are displayed, and no paging anymore. You can also keep using the sorting feature while seeing all the results.

This feature is activated when you use the attribute showViewAllResults of the table tag, and set it to true. Therefore, you can use it whenever it pleases you.

Implementation

If you want to know how I converted the SVN repository to a git repository, read the README.md file on the repository.

I implemented the new features in the shang branch.

Displaytag uses dynamic generated parameters to manage paging, sorting, ordering. I added a new parameter, d-xxxxx-viewAll (xxxxx represents the generated number) set to 1 when you click on the link "View all results". This tells displaytag to set pagesize=0 and then removes all paging as long as the parameter is in the URL.

The dynamic parameter is necessary, since you may have 2 or more tables in one page, and may want to view all results only for one table. Moreover, this parameter must be kept when you click on a column to sort the results, otherwise the pages come back again and you lose the benefit of this feature.

The "View All results" link is displayed only if showViewAllResults=true.

Last Updated on Monday, 13 January 2014 11:59  

Comments  

 
0 #5 DiannaJuicy 2018-11-30 05:20
Hello. I see that you don't update your blog too often. I know that writing articles is
boring and time consuming. But did you know that there is a tool
that allows you to create new articles using existing content
(from article directories or other pages from your niche)?
And it does it very well. The new articles are unique and pass the copyscape test.

Search in google and try: miftolo's tools
Quote
 
 
0 #4 BestCarol 2018-11-21 15:25
I see you don't monetize your website, don't waste your traffic, you can earn extra cash every month.

You can use the best adsense alternative for
any type of website (they approve all websites), for more details simply search in gooogle: boorfe's tips monetize your website
Quote
 
 
0 #3 AlexisJuicy 2018-11-02 08:24
Hello. I see that you don't update your blog too often. I know that writing content is time consuming
and boring. But did you know that there is a tool that allows you to create new posts using existing
content (from article directories or other websites from your niche)?
And it does it very well. The new articles are high quality and pass the copyscape test.
Search in google and try: miftolo's tools
Quote
 
 
0 #2 GuillermoSmall 2018-02-21 12:38
I have checked your site and i've found some duplicate content, that's why you don't
rank high in google, but there is a tool that can help
you to create 100% unique articles, search
for; Boorfe's tips unlimited content
Quote
 
 
0 #1 2015-01-01 12:35
I used to be recommended this web site by my cousin. I am not sure whether this
put up is written through him as no one else recognize such special approximately my trouble.

You're wonderful! Thanks!
Quote
 

Add comment


Security code
Refresh


Who is online?

We have 37 guests online