Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8413899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:01:27+00:00 2026-06-10T01:01:27+00:00

I have this datatable that loadied from the datatabase, here is : <p:dataTable id=cars

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:01:28+00:00Added an answer on June 10, 2026 at 1:01 am

    You can achieve this using conditional coloring:

    <p:dataTable id="cars" var="car" value="#{acceuilUserController.lc_maj}" tableStyle="width:auto" rowStyleClass=#{(car.lu == false) ? 'red' : null}>
        <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>
    

    If car.lu returns false the style class red is applied to the row. So you have to have this in your CSS:

    .red {
        background-color: red;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 3 collection datatable that shows in this below Month: January ID NAME
I have a untyped DataTable that looks like this (srcTbl): date col_1 col_2 ...
hello I have this code that use to sort a datatable. Dim sortingIndex As
I have a gridview. its data source is a datatable that is loaded from
I have this datatable That I want to have different row color for each
I have this datatable, actually a list of datatable List<DataTable> lstDataSource , now for
I have an asp:ImageButton with OnClick=Btn_OnClick. In Btn_OnClick I have this line: DataTable dtTable
I have a Datatable function like this public DataTable LoadCategory(SetupCategoryBO scBO) { DBConnect myConnection
I have a on memory Datatable like this. I want to produce xml file
I have a method private static DataTable ParseTable(HtmlNode table) and sometimes this method has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.