1

I am working on a project where I am getting a List object with size more than 200.
Is there any way we can have pagination in Struts2 but without using display tag. The reason behind not using Display tag is i can't change the style.
The style in my application is different and using display tag i get some thing different.

Roman C
  • 49,761
  • 33
  • 66
  • 176
  • 1
    http://stackoverflow.com/questions/18961314/using-a-pagination-with-struts-2-and-hibernate – Naman Jun 23 '15 at 11:04

2 Answers2

1

Of course this is possible. But it depends how you like to implement it.

You can use a client javascript library like datatable or jqGrid. For jqGrid also a tag library from the struts2 jQuery project exists.

See samples in the Showcase: http://struts.jgeppert.com/struts2-jquery-grid-showcase/index.action

If you like to paginate on server side with JSP rendering you can simply pass the pagination parameter to your action and calculate the result depending on this parameters.

Johannes
  • 2,060
  • 3
  • 17
  • 27
0

I think you're talking about pagination at GUI Level(since you've mention display tag).

My suggestion is to use Jquery Jtable.I am posting few links go through this

1) Example using struts2 http://www.simplecodestuffs.com/pagination-in-struts-2-using-jquery-jtable-plugin/

2) JTable Official website http://www.jtable.org/

Govinda Sakhare
  • 5,009
  • 6
  • 33
  • 74