0

i use JSF datatable to show my data from my DB. Now i want that when the user select a person from the selectOneMenu and choose a color, all elements in the table which are from that person are style with this color:

enter image description here

So from the example above, just the last row should't colored.

So what's the solution?

Captai-N
  • 1,124
  • 3
  • 15
  • 26
  • Hmmm... duplicate I marked is about tomahawk... missed that. Cannot 'unduplicate' and duplicate again for another link. The Q/A for a plain jsf datatable is here: http://stackoverflow.com/questions/4408441/how-to-assign-custom-css-class-to-arbitrary-arbitrary-rows-of-hdatatable – Kukeltje Jan 26 '17 at 12:28

1 Answers1

0

Ok have solved my own problem.

in my style attribute i have done the following to check the condition:

<b:dataTableColumn value="#{daten.erfasser}" label="Erfasser"
                                    style="color:#{gesamt.auswahlHervorheben eq daten.erfasser ? gesamt.farbe : 'black'}; font-weight:#{gesamt.auswahlHervorheben eq daten.erfasser ? 'bold' : 'none'}"></b:dataTableColumn>

Have a nice day---+++

Captai-N
  • 1,124
  • 3
  • 15
  • 26