0 Replies Latest reply on Oct 13, 2011 2:47 PM by stuffedfaces

    Passing table cell value to java bean to determine styleclass for a richfaces datatable

    stuffedfaces

      I am defining a rich:column in my datatable:

       

      <rich:column styleClass="#{dWRFD1Handler.lsLtZero ? 'font color red style class' :
      '
      font color green style class' } >  <h:outputText value="myBean.value">  ... </rich:column>

       

      how can I pass the value in each cell of this table (integer):

       

      <h:outputText value="myBean.value"> 

      as a parameter for lsLtZero (which checks if the number passed is less than zero) so based on that it would return true or false?

       

      What I am trying to do is to have different  font-colors for the values in the column based on whether each cell in the column is negative or non-negative.

       

      I should mention, I'm new with richfaces. Any ideas?