• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display tag for pagination in jsp

 
chets patel
Ranch Hand
Posts: 77
Eclipse IDE Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I am using display-tag for pagination in jsp. When I click on the next link, URL gets appended with parameters which I dont want.

http://127.0.0.1:8080/Display/display.do?d-49216-s=0&d-49216-o=1&d-49216-p=1

I am getting URL something like above. Can any one please help me.

 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DisplayTag uses that to keep track of which page to display next, and what data to show on that page. Does that present an actual problem?
 
chets patel
Ranch Hand
Posts: 77
Eclipse IDE Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not creating a problem but unnecessarily appended in the URL. Is there any option to avoid that.
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't call it unnecessary - you need to communicate to the server what to display next in some way. You can cut down on the number of parameters (1 instead of 3) by using sessions; see the "Preserve pagination status" page of the example web app for details on that.
 
Avishkar Nikale
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also create a custom javascript which can be called on the links.

You will run into problems when your actual form data (which is also appended in the GET url )
starts getting bigger & overflows the normal GET limit.
The links will stop working.

So if you are also annoyed + would like to keep your links keep on working you can use advanced javascript to append
these field value pairs & submit a post request.
 
chets patel
Ranch Hand
Posts: 77
Eclipse IDE Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to export the table to excel using display tag. But I am not getting the hyper link for export to excel. It is just showing the lable but not the hyperlink for exporting. Can any one please tell me what might be the error.

I am putting something like below in display tag.properties
export.banner=<div class="Excel">Excel</div>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic