rowStyleClass

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
francescoL
Posts: 9
Joined: 15 Mar 2019, 19:02

27 Mar 2020, 15:52

Hi,
use this code:

<style type="text/css">
.rosso {
background-color: #FF9A96;
background-image: none;
color: #000000;
}

.nero {
background-color: #242424;
background-image: none;
color: #FFFFFF;
}

.giallo {
background-color: #E5E98C;
background-image: none;
color: #000000;
}

</style>
-------------------------------------
<p:panel header="#{main.titoloVeicoli}" toggleable="true" style="font-size:#{sistema.FONT_SIZE}px;">
<p:dataTable id="mainTableVeicoli" value="#{main.modelVeicoli}" var="o" selection="#{main.selectedVeicolo}"
selectionMode="single" scrollable="true" widgetVar="veicoliTable"
paginator="true" rows="6969" paginatorPosition="bottom"
paginatorTemplate="{Exporters}"
rowsPerPageTemplate="#{sistema.ROWSxPAGE}" lazy="true" resizableColumns="true" editable="false"
emptyMessage="Nessun dato..."
rowStyleClass="#{o.presente ? 'nero' : (o.rosso ? 'rosso' : null)}">

if I don't use olympia theme it works correctly. if i use olympia theme it doesn't work
To apply theme use:
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>olympia-#{guestPreferences.theme}</param-value>
</context-param>


Thanks!!!

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

03 Apr 2020, 12:42

Please try;

Code: Select all

body .ui-datatable .ui-datatable-data > tr.rosso {
   background-color: #FF9A96;
   background-image: none;
   color: #000000;
}

body .ui-datatable .ui-datatable-data > tr.nero {
   background-color: #242424;
   background-image: none;
   color: #FFFFFF;
}

body .ui-datatable .ui-datatable-data > tr.giallo {
   background-color: #E5E98C;
   background-image: none;
   color: #000000;
}
Best Regards,

Post Reply

Return to “Olympia - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests