Question

I'm building an application using Struts 2 + Spring 3 + Hibernate 3. I was wondering if any of you knows of any alternative to the "displaytag" library to draw and manage tables.

Not that I dislike it so much, but I read this comment and made me wonder about other options. And I see it has not been updated in a while and I was wondering if there is some reason for that (like a better/more popular alternative available).

Was it helpful?

Solution

I'm moving to a jQuery datagrid, returning the data with S2 json-plugin. The data gets to my action from a service object that then access the entity objects.

Paging is currently in the service objects using the criteria api, backed by hibernate 3. Still a work in progress but it is working.

OTHER TIPS

Try Datatables,a jquery plugin.It has endless features and the best thing is that you dont have to change basic html format of tables to implement it, just pass the id of your table. I was also frustrated by the limitations and requirements of display tag

Instead of loading all the data into memory and have DisplayTag to perform pagination through javascript magic, you can configure DisplayTag's pagination to load the right chunk of data only when it is requested. This way, you are not going to have performance loss since you are not loading all the data into memory.

I can't remember the code on top of my head (I'm away from my work machine), but here's an example which may be useful to you: http://i-work-i-blog.blogspot.com/2007/06/display-tag-and-external-pagination.html

By pure chance I've found something similar JMesa

one alternative is the grid tag from struts2 jquery plugin. take a look at the showcase and the special grid showcase.

I think, you should interest the PrimeFaces library, especially, a datatable component. It works with Spring Framework.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top