CSS:
.sample {
background: red;
}
XHTML
<p:inputText id="inputTxtOnForm" value="hi" styleClass="sample"/>
<p:column id="articleDescription" headerText="Article Description"
filterBy="#{article.description}" filterMatchMode="startsWith">
<p:inputText id="inputTxtOnDataTable" value="#{article.description}"
styleClass="sample" />
</p:column>
inputTxtOnForm is placed on a form directly. inputTxtOnDataTable is placed on a column of a datatable.
The styleClass on the inputText having id="inputTxtOnForm" is getting applied. But, styleClass is not getting applied on the inputText having id="inputTxtOnDataTable". The properties of primefaces’ themes.css are not getting over-ridden in the latter case.
Is it a known bug ? Is there any workaround for the same.
worked for me. Probably, the background is marked as important in primefaces’ css.