-3

I need to output a picklist value by using the tag outputField; however, I am getting the following error message:

An attempt was made to load the template for the example: Value for <apex: outputField> is not dynamic binding !. Please try editing your markup to correct the problem.

Component:

<apex:component access="global">
   <apex:attribute name="contact_et" type="Contact" description="Contact entry"/>
   <apex:outputField value="contact_et.EmailTitle__c"/>
</apex:component>

Email template:

<messaging:emailTemplate subject="Test" recipientType="Contact" language="en">
<messaging:htmlEmailBody >
    <c:component contact_et={!recipient}/>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
-2

It was missing "{!...}", solution as follows:

<apex:component access="global">
   <apex:attribute name="contact_et" type="Contact" description="Contact entry"/>
   <apex:outputField value="{!contact_et.EmailTitle__c}"/>
</apex:component>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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