如何添加或更改JSF数据表(primfaces)的类属性? [英] How do I add or change the class attribute of a JSF dataTable (primefaces)?

查看:95
本文介绍了如何添加或更改JSF数据表(primfaces)的类属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 PrimeFaces < p:dataTable> ,我想在生成的HTML < table> 元素中指定一个CSS类。如果我使用 styleClass 属性,那么这将被添加到包装< div> ,而不是< c $ c>< table> 。我如何在< table> 上获得它?

I have a PrimeFaces <p:dataTable> and I want to specify a CSS class in the generated HTML <table> element. If I use the styleClass attribute, then this will be added to the wrapping <div> instead of the <table>. How can I get it on the <table> instead?

推荐答案

如果您设置 tableStyle tableStyleClass 属性,它将向表元素添加css类。

If you set tableStyle or tableStyleClass attribute, it will add the css class to the table element.

这篇关于如何添加或更改JSF数据表(primfaces)的类属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆