问题
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