Reputation: 1729
I have JSF panelGrid which no of columns are dynamic ,in this case how should i declare the columnclasses in css ?
<h:panelGrid id="testpanel" columns="#{message.no_of_columns}" rows="#{message.no_of_rows}" columnClasses="">
I want to have same css style for all the columns.
Thanks.
Upvotes: 0
Views: 1323
Reputation: 1108742
Either generate a commaseparated string with as many items as the number of columns:
<h:panelGrid ... columnClasses="#{message.columnClasses}">
Or redefine the style so that it can be applied at table level:
<h:panelGrid ... styleClass="dynamicGrid">
with
.dynamicGrid td {
/* Put the original CSS here, it'll get applied to every column. */
}
Upvotes: 2