简体   繁体   English

推荐JSP表taglib吗?

[英]Recommended JSP table taglib?

Can you recommend a declarative table-generation taglib for JSP (with EL) that is still being maintained? 您是否可以推荐仍在维护的用于JSP(带有EL)的声明性表生成taglib? I found a few, such as the Jakarata taglib and Display tag but nothing seems to have been updated in the past year or so. 我发现了一些标签 ,例如Jakarata taglib和Display标签,但似乎在过去一年左右没有更新。

Any recommendations would be appreciated. 任何建议,将不胜感激。

It's true that Displaytag development seems to be moribund, but I'm using it in an application and other than a couple of minor issues we haven't had problems. 确实,Displaytag的开发似乎已经死了,但我正在应用程序中使用它,除了一些我们没有遇到过的小问题以外,我还没有使用它。 The source is pretty clean and easy to customize/fix if you're desperate. 如果您不顾一切,源代码非常干净,并且易于自定义/修复。

The main thing that's kind-of hard to do with Displaytag is to have a table viewing system that allows for user-driven column ordering. 使用Displaytag很难完成的主要工作是拥有一个允许用户驱动的列排序的表查看系统。 The ordering of columns is determined by the order of the column tags in the Displaytag JSP body, not by the order of columns as delivered in the table data structure by the server-side query action (or whatever generates the table data). 列的顺序是由Displaytag JSP主体中的列标签的顺序确定的,而不是由服务器端查询操作(或生成表数据的任何内容)在表数据结构中传递的列的顺序确定的。 It'd be possible to code around that explicitly in JSP, but it'd be quite a mess I suspect. 可以在JSP中显式地对此进行编码,但是我怀疑这将是一团糟。

Display Tag which you mentioned is good one. 您提到的显示标签是一个不错的选择。 It offers option for lot of customization. 它提供了许多自定义选项。

Display tag is probably the most common, but it's still far for being good enough.I have used it intensively and it has severe performance issues, in special when you use custom Decorators. 显示广告代码可能是最常见的广告代码,但仍然不够好。我已经大量使用了它,并且存在严重的性能问题,特别是在使用自定义装饰器时。 Decorators are needed much more often than they should be and you feel like writing html in old servlet's style. 需要的装饰器比实际需要的要多得多,并且您感觉就像用旧的servlet样式编写html。 Ordering is also a mess and it's made alphabetically, specially painful with dates in dd/MM/yyyy format ( I made a dirty workaround writing yyyyMMdd with display:none first of the formated value). 排序也是一团糟,而且是按字母顺序进行的,尤其以dd / MM / yyyy格式的日期令人痛苦(我做了一个肮脏的解决方法,将yyyyMMdd的显示值设置为display:none)。 Parameter propagation for links generated by the tag is another headache, not impossible but very stupid to waste your time in such matter. 由标签生成的链接的参数传播是另一个令人头疼的事情,这并非没有可能,但非常愚蠢,浪费了您的时间。 Exporting options are mostly nice and can save you a bit of time if your client just want what displaytag offers. 如果您的客户只想要displaytag提供的内容,则导出选项通常很好,可以节省一些时间。 External pagination is also good. 外部分页也不错。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM