Example 1 : color a column conditionally in a table
#{(row.TotalWeighed!=null)? (row.GreenOrRed=='Green'? 'background-color:Green;color:White;' : 'background-color:Red;color:White'):''}
Example 2: Load an image based on the logged in user:
#{sessionScope.loggedInUser=='InternalUser'? 'background-image:url("Image/internalfacing.png")' : 'background-image:url("Image/ds_facing.png")'}
#{(row.TotalWeighed!=null)? (row.GreenOrRed=='Green'? 'background-color:Green;color:White;' : 'background-color:Red;color:White'):''}
Example 2: Load an image based on the logged in user:
#{sessionScope.loggedInUser=='InternalUser'? 'background-image:url("Image/internalfacing.png")' : 'background-image:url("Image/ds_facing.png")'}
No comments:
Post a Comment