Gridview like display for hibernate objects in Java?
-
03-07-2019 - |
Question
Essentially what I am looking for is a good way to build a quick database interface. In my (limited) experience with ASP.net I've used a Gridview control for this task. However for this project I am going to be using Java.
Can anyone recommend a good way to set up a Gridview like control (with editable and sortable rows) in a Java web framework? I was leaning towards using Spring MVC, but I am not particular attached to any Java web framework.
My data is pulled from a database using Hibernate, so any control that could plug directly into that would be great.
Solution
Java Server Faces (JSF) has a dataTable component. If you combine that with a framework built on top of JSF such as IceFaces you will get sorting as well.
But if you're looking for a quick library to drop into a JSP, check out displayTag. Doesn't handle editing of the data (should be easy enough to write some code for this anyway) but will handle paging and sorting.
OTHER TIPS
Tapestry 5 also has a grid view as well as good integration with Hibernate. This tutorial shows you the basics.