How do I add or change the class attribute of a JSF dataTable (primefaces)?

邮差的信 提交于 2019-12-31 00:30:28

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/12266895/how-do-i-add-or-change-the-class-attribute-of-a-jsf-datatable-primefaces

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!