1 Reply Latest reply on Jul 17, 2007 2:51 AM by Tom Barry

    Conditional row styles?

    Tom Barry Newbie

      The docs allude to setting styles for individual rows (as opposed to alternating styles between rows):

      A space separated list of classes may also be specified for any individual row.


      I don't follow this at all. In a Seam app, I'd like to conditionally highlight rows in a rich:datatable based on an expression for each row, i.e. add a 'highlighted' style to each row where #{adminBean.highlight(cr)}.

      Is this possible?

        • 1. Re: Conditional row styles?
          Tom Barry Newbie

          Bah. I see how to do it. The same class that produces the DataModel would also produce a String of classes- one entry per row:

          plain, highlighted, highlighted, plain, plain, ....

          rowClasses="#{admin.rowClasses}"

          This quote from the docs:

          A space separated list of classes may also be specified for any individual row.


          seems inaccurate though. Unless I'm missing something, separating the classes with spaces results with all rows getting all classes.