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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.