This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Dec 20, 2011, 4:05 PM
2 Posts

Custom View Row Classes

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags: Row Classes Table
  • Replies: 1
I have a View on my xpage and I am wanting to add some custom row classes based upon a value in the current row documents "Status" field. For example if it is overdue I wan't to add a class called "overdue".

I see that I can add these manually by entering a value into View > All Properties > Styling > rowClasses but wondered how I would go about doing this programatically and where I should perhaps start.

Thanks
Jan 4, 2012, 6:54 AM
129 Posts
Re: Custom View Row Classes
rowClasses is meant to be a comma separted list that's iterated for each row. Useful for tagging rows with odd/even classes. You can't compute it for each row.
 
E.g. rowClasses="odd,even" 
 
row1 -> odd 
row2 -> even 
row3 -> odd 
.. 
 
I emulated dynamic styling of rows in a project I worked on by putting a computed styleClass on the first column. If your users have browsers that support general sibling selector, then you can use this technique.
 
E.g. 
column styleClass: inactive 
 
CSS: 
.inactive, .inactive ~ td { color:red; }

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal