I have this datatable that loadied from the datatabase, here is :
<p:dataTable id="cars" var="car" value="#{acceuilUserController.lc_maj}" tableStyle="width:auto">
<p:column headerText="Commande N° : " style="width:100px">
<h:outputText value="#{car.commande.id}" />
</p:column>
<p:column headerText="Date de mise à jour : " style="width:100px">
<h:outputText value="#{car.dateMaj}" />
</p:column>
<p:column headerText="Decision : " style="width:100px">
<h:outputText value="#{car.decison}" />
</p:column>
<p:column headerText="Etat : " style="width:100px">
<h:outputText value="#{car.etat}" />
</p:column>
</p:dataTable>
I have another attribut car.lu that accept two values :true or false, I want when it is false the line flashes and become colored with red
how I can achieve this?
You can achieve this using conditional coloring:
If
car.lureturnsfalsethe style classredis applied to the row. So you have to have this in your CSS: