1

I have the following code in the VF page:

            <apex:column value="{!TriggerCoverage.PercentageCovered}%">
            <apex:facet name="header">Percent</apex:facet>                   
            </apex:column>

I want to be able to change the color of the font of TriggerCoverage.PercentageCovered based on certain condition. How can I achieve this? I'm very new to visual force. Thank you!

1 Answer 1

1

I think your question is about dynamic styling depending on the value of a property. If that is what you are looking for, you could add mergefiels also to style attributes e.g. like

<apex:column style="color: rgb({!redvalue},100,100)" value="{!TriggerCoverage.PercentageCovered}%">

Where "redvalue" is new property in the controller, maybe there calculated by the coverage. This would dynamically colorize your text.

1
  • Yeah that is why I deleted my answer.
    – Keith C
    Jul 25, 2014 at 20:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .