You need to sign in to do that
Don't have an account?
ScriptMonkey
Dynamic Component Problem
I posted a similiar issue in the VisualForce Forum, but realized this is more of an Apex issue.
I'm using the example for dynamic components that I found in the docs, since I need the functionality. The concept seems perfect for my project, but the example doesn't even work.
I used this (exactly from the docs):
public Component.Apex.PageMessage getCheckDueDate() { Component.Apex.SectionHeader sectionHeader= new Component.Apex.SectionHeader(); sectionHeader.title='This form was due on 03/06/2011!'; date myDate = date.today(); date dueDate = date.newInstance(2011, 3, 6); boolean dueNow = myDate.isSameDay(dueDate); if (!dueNow) return sectionHeader; else return null; }
and I get the error:
Save error: Invalid type: Component.Apex.SectionHeader
It's like it doesn't recognize the new object types. (having the example code not work is VERY frustrating)
If anyone can help, I would greatly appreciate it.
Dynamic Visualforce Components are in Pilot still I think.
Have you contacted Salesforce Support to enable Dynamic Components in your Org?
I believe you ahve to have SF Support enable this since its a Pilot feature and not GA (Generally Available) yet.
All Answers
Dynamic Visualforce Components are in Pilot still I think.
Have you contacted Salesforce Support to enable Dynamic Components in your Org?
I believe you ahve to have SF Support enable this since its a Pilot feature and not GA (Generally Available) yet.
Also make sure the Version on your Apex / VF is version 22 or 23.
Waiting for them to enable it now, thank you!
Great. If this resolved your problem please mark the solution as accepted.