Conditionally colouring of row cell in adf

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.

Vinay

I am an Oracle ACE in Oracle ADF/Webcenter. Sr Java Consultant-working on Java/J2EE/Oracle ADF/Webcenter Portal/ content and Hibernate for several years. I'm an active member of the OTN JDeveloper/Webcenter forum. Passionate about learning new technologies. I am here to share my knowledge. Give your views and suggestion on [email protected] .

More Posts - Website

Follow Me:
TwitterLinkedInGoogle PlusYouTube