You need to sign in to do that
Don't have an account?
Ismael
Problem with Custom Controller within a Managed Package
Good morning,
I'm developing a Visualforce page to be part of a managed package using the 'WFM' prefix/namespace. This package includes a custom object called 'Round' that I want to use within a Visualforce page. For this purpose, I included the following code in the Page:
<apex:inputField id="roundName" value="{!WFM__Round__c.Name}"/>
I also included the following code in the Controller:
public WFM__Round__c getWFM__Round__c() {
if(round == null) round = new WFM__Round__c();
return round;
}
This generates the following error:
Error: Compile Error: Invalid identifier: getWFM__Round__c at line 11 column 25
Any idea?
Many thanks in advance for your help.
-Ismael
I'm developing a Visualforce page to be part of a managed package using the 'WFM' prefix/namespace. This package includes a custom object called 'Round' that I want to use within a Visualforce page. For this purpose, I included the following code in the Page:
<apex:inputField id="roundName" value="{!WFM__Round__c.Name}"/>
I also included the following code in the Controller:
public WFM__Round__c getWFM__Round__c() {
if(round == null) round = new WFM__Round__c();
return round;
}
This generates the following error:
Error: Compile Error: Invalid identifier: getWFM__Round__c at line 11 column 25
Any idea?
Many thanks in advance for your help.
-Ismael
Thanks for the answer. Does it mean that Visualforce does not support the use of objects that are part of managed packages?
-Ismael
just change the method name to something that does not use __ in the name, e.g.
Error: Unknown property 'newRoundController.WFM__Round__c'
Create Apex method 'WFM__newRoundController.getWFM__Round__c'
For reference purposes, here is the code used in the Page:
<apex:inputField id="roundName" value="{!WFM__Round__c.Name}"/>
Am I missing something?
Thanks again for your help.
-Ismael
We found a way to make it work, using your code and the following code in the page:
<apex:inputField id="roundName" value="{!round.name}"/>
Thanks a lot for your help!
-Ismael
Can you please share what the code was as I cannot see it in the above posts.
Thanks!