简体   繁体   English

类似于JSF 2.0 DataTable的组件

[英]JSF 2.0 DataTable like component

I need to display some tabular data in a JSF page. 我需要在JSF页面中显示一些表格数据。 I need some kind of grid component, but it is a must for it to have a pager and also to be able to sort the displayed data(example: by date created, alphabetically or simmilar...) Most probably i will start to create a custom component that fits all my needs, but i was wondering is is there any tag in JSF 2.0 or in some other library that already includes all this features. 我需要某种网格组件,但是必须具有寻呼机并且能够对显示的数据进行排序(例如:按创建的日期,按字母顺序或类似的顺序...)很可能我将开始创建一个满足我所有需求的自定义组件,但我想知道JSF 2.0或某些其他库中是否已经包含所有这些功能的任何标签。 I would prefer not to use an external library like richfaces or similar just clean JSF 2.0. 我希望不要使用诸如richfaces之类的外部库或类似的干净JSF 2.0。 But if there is any good gadget out there i might give it a try. 但是,如果那里有任何好的工具,我可以尝试一下。

Have a look at the p:dataTable component from Primefaces . 看一下Primefacesp:dataTable组件 It has sorting, filtering, pagination, row selection and a lot more features. 它具有排序,过滤,分页,行选择等更多功能。

Getting started with Primefaces is quite simple. Primefaces入门非常简单。 Download the jar , put it in your classpath and add the following namespace definition to your facelet's html tag: 下载jar ,将其放在您的类路径中,然后将以下名称空间定义添加到facelet的html标记中:

xmlns:p="http://primefaces.prime.com.tr/ui"

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

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