开发者

How to show tabular data in a Java web app

开发者 https://www.devze.com 2023-01-01 09:26 出处:网络
Is there any counterpart to ASP.NET\'s DataGrid (or Dat开发者_开发百科aView) in the various J2EE web application technologies (specifically Struts)?

Is there any counterpart to ASP.NET's DataGrid (or Dat开发者_开发百科aView) in the various J2EE web application technologies (specifically Struts)? In other words, what is the de facto method for showing tabular data in a J2EE web application?


Vaadin Grid

Vaadin makes a component-based web framework for Java that provides, among many other things, a data grid component with lazy-loading, smooth scrolling, efficient handling of big data, and flexible configuration.

The client-side implementation of Vaadin Grid is based on a standalone Web Component implementation. With the Vaadin Flow framework, you can use Grid in Java code without writing a line of JavaScript.


The general approach would be to generate the HTML table yourself, and populate within a JSP (e.g. see here, although I would separate the logic/database code into a servlet rather than code directly into the JSP).

If you're using Struts, then Struts Layout may be of interest.


jQuery DataTable is a good option for displaying tabular data in Java Web applications. This plugin enhances HTML table with features such as pagination,sorting, searching etc.

You can find a good example for the same here.

0

精彩评论

暂无评论...
验证码 换一张
取 消