开发者

How to show tabular data in a Java web app

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜