I am trying to figure out how to render a Visualforce component containing inputfields conditionally, depending on a stage field outside of the visualforce page. I would like to render a different visualforce component depending on the stage. Here's what I have so far. When I run as-is, I can't get anything to display within my visualforce page.
VF Page:
<apex:form >
<c:StageFields record="{!opportunity}" rendered="{!opportunity.StageName == 'Received'}" />
</apex:form>
Component:
<apex:component>
<apex:attribute name="record" type="Opportunity" description="Opportunity"/>
<apex:inputField value="{!record.Rep_Name__c}"/>
</apex:component>