0

I am trying to create a dynamic visual force page and am referring https://developer.salesforce.com/page/Dynamic_Visualforce_Components

I am getting the below error when trying to save the class:

UNKNOWN_EXCEPTION: core.apexpages.quickfix.QuickFixException: Component c:apex does not exist

Below is my code:

public with sharing class CreateSurvey {
    public List<Component.Apex> components; 
    public Component.Apex.PageBlock CreateSurveyPage() {
        Component.Apex.PageBlock surveyBlock = new Component.Apex.PageBlock();

    }
}

I am not able to figure out the issue. Any help will be appreciated.

Thanks.

3
  • 2
    Delete the second line. Where you do need to represent a collection of these dynamic components, the appropriate type to use is ApexPages.Component.
    – Keith C
    Oct 20, 2014 at 10:25
  • Keith C you should flesh your comment ^ out into an answer.
    – pchittum
    Oct 20, 2014 at 11:14
  • Ah.. Am not getting the error anymore. So does that mean that we cannot create a list of such components? I have not substituted with ApexPages.Component.
    – flamesavor
    Oct 20, 2014 at 11:24

0

You must log in to answer this question.

Browse other questions tagged .