14

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.

  • 2
    Same problem here :-( But it's not connected to Eclipse as I can reproduce it within the Developer Console. – Robert Sösemann Aug 12 '14 at 14:24
  • 1
    Yeah, I got the same error on the developer console too. However, changing the pages or the component through the normal web interface does seem to work... – rael_kid Aug 15 '14 at 13:35
  • 1
    I can't find the reference to this now, but it is a bug in the tooling API. If you can change Eclipse to use the metadata API instead, then you can bypass this. – Mike Ginou Mar 24 '16 at 19:32

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.