1 Reply Latest reply on Oct 16, 2011 7:06 PM by Brendan Healey

    Giving style to a column in Richfaces Datatable based on value in each cell

    G. Gallager Newbie

      Hi!

       

      I am looking for a way to give style to each number in a column of a datatable, based on whether the number is negative or non-negative. For example the number would be red if negative and green if non-negative.

       

      Example:

       

          

      ...
      Transaction

      -$25.00

      +$5.00

      +$10.00

      -$1.50

      ...

       

      How can I do this The numbers are being loaded into the table with <h:outputText value="#{mybean.transaction}"/> here:

       

      <rich:column>

                                                                                                      <f:facet name="header">Transaction</f:facet>

                                                                                                      <h:outputText value="#{mybean.transaction}"/>

      </rich:column>

       

      so I cannot give style to the numbers seperately. Any help asap is appreciated. Thanks!