I'm trying to build a controller extension for the Opportunity Standard Controller, along with a Visualforce page that pullsa method from that extension. However, when I try to save the Visualforce page I receive the error: "Unknown function ProductRate. Check spelling."
Here is the Controller Extension:
public class TestClass {
private final Opportunity opp;
public TestClass(ApexPages.StandardController stdController) {
this.opp = (Opportunity)stdController.getRecord();
}
public String getProductRate() {
return 'rate';
}
}
And here is the Visualforce page:
I'm completely at a loss about why the Visualforce page won't access the ProductRate method! Please help!<apex:page standardController="Opportunity" extensions="TestClass">
<apex:outputText value="{!ProductRate()}"/>
</apex:page>
Please use the above code<apex:page standardController="Opportunity" extensions="TestClass"> <apex:outputText value="{!ProductRate}"/> </apex:page>