I tried to use styleClass giving one of these style:
Code: Select all
<style>
th.filter-selected {
background-color:aqua !important;
}
th.filter-unselected {
}
</style>
Code: Select all
<p:remoteCommand name="onFilter" update="mytable" />
<p:ajax event="filter" listener="#{myBean.onFilter}" oncomplete="onFilter()"/>
<p:column filterBy="#{row.nData}" headerText="MyColumn" filterMatchMode="contains" sortBy="#{row.nData}"
styleClass="#{myBean.columnFiltered[0]}" >
<h:outputText value="#{row.nData}" />
</p:column>
The style is assigned when the table is created, but it doesn't change when I change his value on filter event.
How can I fix it?
Thanks