Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I would like to conditionally render a component in a VisualForce page based on a custom field.

I was hoping to do something like this:

<apex:page standardController="myObject__c">
    <c:myComponent myProperty="{! Id }" render="{! myBoolean__c }" />
</apex:page>

Components don't have a render property though.

What is the best way to do this?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

The property you're looking for is called rendered, not render. And it's available on most (if not all) tags.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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