When I applied rowStyleClass
to my DataTable, it was based on the following conditions:
<style>
.deleted {
color: darkgray;
text-decoration: line-through;
}
.normal {
}
</style>
However, I encountered an issue where the last two columns were not following the rule. I tried various solutions but none seemed to work.
<p:dataTable
rowStyleClass="#{placementsController.started(placement) ? 'started' : ''} #{empty placement.deleted ? '' : 'deleted'}">
<!-- other columns here -->
<p:column style="width: 60px; text-align: center;">
<p:commandLink id="deleteLink" actionListener="#{placementsController.delete(placement)}" update="placementsTable">
<h:outputText value="#{empty placement.deleted ? 'delete' : 'undelete'}" style="text-decoration: none !important;"/>
</p:commandLink>
</p:column>
<p:column style="width: 50px;text-align: center; text-decoration: none !important;">
<p:commandLink id="cloneCommand" action="#{placementsController.clone(placement)}" update="placementsTable">
<h:outputText value="clone"/>
</p:commandLink>
</p:column>
</p:dataTable>