File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Display tag for pagination in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Display tag for pagination in jsp" Watch "Display tag for pagination in jsp" New topic
Author

Display tag for pagination in jsp

chets patel
Ranch Hand

Joined: Apr 27, 2010
Posts: 74

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

Joined: Oct 14, 2008
Posts: 1337
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

Joined: Apr 27, 2010
Posts: 74

It is not creating a problem but unnecessarily appended in the URL. Is there any option to avoid that.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
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

Joined: Aug 06, 2010
Posts: 173
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.


Regards,
Avishkar Nikale
chets patel
Ranch Hand

Joined: Apr 27, 2010
Posts: 74

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>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display tag for pagination in jsp