I have a component that gets an instance custom Apex Class as an attribute, ie:
<apex:component controller="ComponentController">
<apex:attribute name="myAttr" assignTo="{!attr}" type="MyApexClass" />
</apex:component>
I also have this class:
public with sharing class MyApexClass{
//lots of content
}
But, since I updated Eclipse to the latest version (Summer '14, API version 31) I get this error when I try to save the component (or a page on which the component is used): Compilation error: Type is not visible: myapexclass
.
I've already tried making MyApexClass global, doing so does solve the problem, however, this is for managed package so I really want to avoid making anything global that doesn't logically have to be, especially because it does work if I use Eclipse for version 30.
Best Answer
Please Find the solution.
In this line attribute type should be object then it would work fine you can take reference from my code;
aura component
controller or helper
//apex class