Some time, in our application we need to display some table cells highlighted with some colours.for different condition we need Different colour of row or some particular cell. This can be possible by using expression language(EL) .We can write an ternary operation in expression language(EL).For example if we are displaying data in tabular structure .And we want to highlight the Employee id which have salary eq to ‘50000’.For this , we can write below expression in INLINE PROPERTY OF EMPLOYEE ID.
After writing this EL in INLINE Property we can give conditionally coloring in table cells.
background-color:#{(row.salary eq "50000"?'Aqua':'')}
This El mean if salary of corresponding row is equal to 50000 then table cell color will be aqua. Similarly we can use GT and LT for greater than or less than respectively.