Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Here is my Apexclass

public  class Orgfinhist {
   public OrgFinHist__c mcc {get; private set;}
   public Orgfinhist (ApexPages.StandardController sc) {
       mcc = (OrgFinHist__c) sc.getRecord();
   }
}

and my visualforcepage name: org

<apex:page standardController="OrgFinHist__c" extensions="Orgfinhist ">
  hello
   <apex:form>
     <apex:page>
     <apex:inputField value="{!mcc .name}"/>
     </apex:page>

   </apex:form>

</apex:page>

and error displaying:Error: Unknown property 'mcc' referenced in org

share|improve this question
    
Remove the apex:page tags that surround the apex:inputField; they may be hiding the attributes of the outer (correct) apex:page tags. –  Keith C Jun 9 at 15:20
    
Thanks @keith c –  sravanthi Jun 9 at 15:30

1 Answer 1

Like Keith said before, you don't need the extra page tags around the input field.

<apex:page>//remove this line
  <apex:inputField value="{!mcc .name}"/> // <--remove extra space {!mcc.name}
</apex:page>//remove this line

Since you are using an input field, you have 2 choices.

1) Use the standard controller object.

<apex:inputField value="{!OrgFinHist__c.Name}" />

2) Make the setter public

public OrgFinHist__c mcc {get; set;}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.