You need to sign in to do that
Don't have an account?
Shubham Kashyap 27
Unknown Property 'name' Error using Custom Controller
I am getting this error "Unknown property 'name' referenced in PageReference_Example_VF".
Can someone fix this, please?
Controller:
Can someone fix this, please?
Controller:
public class PageReference_Example { public String selected {set;get;} public String name {set;get;} public PageReference callMe(){ if(selected=='Housing'){ PageReference p = new PageReference('/apex/HousingLoanPage'); return p; } else{ if(selected=='Personal'){ PageReference p = new PageReference('/apex/PersonalLoanPage'); return p; } else return null; } } }VF page
<apex:page controller="PageReference_Example"> <apex:form> <apex:page > <apex:pageBlock title="Home Page"> <apex:pageBlockSection > <apex:pageBlockSectionItem> <apex:outputLabel value="Name"/> <apex:inputText value="{!name}"/> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:pageBlock> </apex:page> </apex:form> </apex:page>
Hi Shubham,
You are geting this because you have two <apex:page > tag in you page.
Thnaks,
Manohar
Use this controller
Thank you, guys could not figure that out.
Appreciate the support.