Conditionally colouring of row cell in adf

By Vinay | May 25, 2009 | 1,235 views
Category Java, Oracle ADF

  Share


About author  I am Java/oracle professional.Working on Java/J2EE technologies and i.e Oracle ADF,Spring,hibernate,J2ee,PL/sql,Apps for 2+ years.I am passionate about learning new technologies.I am sharing my knowledge. Give your views and suggestion. http://www.linkedin.com/in/vinaykumar2 Read more from this author


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.

  • Delicious
  • Yahoo Buzz
  • Digg
  • DZone
  • Facebook
  • LinkedIn
  • Twitter
  • Share/Bookmark
Read more post on colouring of table cells Conditionally colouring in adf Oracle ADF 

  Share

Leave a Comment

Name:

E-Mail :

Website :

Comments :