11

Has anyone come up against the following issue.

I have a VF Component that references a managed component as follows:

<apex:component access="global" >
    <apex:attribute name="invoice" description="The invoice." type="Invoice__c" access="global" />   
    <ffbext:currencysymbol iso="{!invoice.Currency__c}" symbolVar="invoiceCurrencySymbol" />
                     <!-- remaining content excluded for brevity -->
</apex:component>

And, when I save (only in Spring '13 API-27 Sandbox) I get the error:

Error: <apex:attribute assignTo> cannot be same as the <apex:attribute name> ( iso )

I can easily circumnavigate the issue by changing API version to 26. However, has anyone come across this, or know what it means?

Thanks

15

From the spring 13 release notes

there is a new compile-time check that prevents giving custom Visualforce component attributes the same name as the assignTovalue (which can refer to a property or method in the component’s controller). This checking prevents a number of programming errors (bugs) that can result in runtime errors. This change is versioned, and you must update your Visualforcecomponents and the pages that contain them to API version 27.0 to enable the new behavior.

To make this component compile under API version 27.0, change either the attribute name or the assignTovalue (which might require you to also change a controller method or property).

1

Phil, in your case, until the managed package creators address the issue (which might be a challenge), you will need to assign your page an API version prior to 27.0.

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.