function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
wadams2010wadams2010 

Unknown Property Error with Standard Controller

I am currently getting an error 'Unknown property 'Feature_Request__cStandardController.ofrJO'' on a visualforce page I am trying to implement. I followed a design I had from a wrapper class that worked for me prior but in this case I only want to have the command button be on a specific line. I don't think this is the issue but I would really love some help from the community on resolving the issue. Thanks in advance!

Visualforce Page:
 
<apex:page StandardController="Feature_Request__c" extensions="FeatReqOppJunctionExtension">
		<apex:includescript value="//code.jquery.com/jquery-1.11.1.min.js" / >
        <apex:includescript value="//cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js" />
        <apex:stylesheet value="//cdn.datatables.net/1.10.4/css/jquery.dataTables.css" />
        <script>
            j$ = jQuery.noConflict();
            j$(document).ready( function () {
                var contactTable = j$('[id$="table"]').DataTable({
                    
                });
            });
    </script>            
    <apex:form>
        <apex:pageBlock>
            <apex:pageBlockButtons>
            </apex:pageBlockButtons>
            <!-- In our table we are displaying the cContact records -->
            <apex:pageBlockTable value="{!ofrJO}" var="ofr" id="table" style="tablesorter">
                <apex:column headerValue="Action">
                    <!-- This is our selected Boolean property in our wrapper class -->
                    <apex:commandButton value="{!ofr.selected}"/>
                </apex:column>
                <!-- This is how we access the contact values within our cContact container/wrapper -->
                <apex:column value="{!ofr.fr.Name}" />
                <apex:column value="{!ofr.fr.Description_of_Request__c}" />        
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Apex: 
 
public with sharing class FeatReqOppJunctionExtension {

        //Our collection of the class/wrapper objects cContact 
    public Opportunity theOpp {get; set;}
    public Feature_Request__c FeaReq {get; set;}
    public Opportunity_Feature_Request__c oppFR {get; set;}
    public List<ofrJO> featReqList {get; set;}
    
    public FeatReqOppJunctionExtension(ApexPages.StandardController controller) { 

        String oppId = ApexPages.currentPage().getParameters().get('oppId');
        theOpp = [select Id from Opportunity where Id =:oppId limit 1];
    }
    
    public List<ofrJO> getFeatReq() {
        if(featReqList == null) {
            featReqList = new List<ofrJO>();
            for(Feature_Request__c fr: [select Id, Name, Description_of_Request__c
                            from Feature_Request__c
                            ]) {
                featReqList.add(new ofrJO(fr));
            }
        }
        return featReqList;
    }
    
        public PageReference insertRec() {
        
        for(ofrJO freq: getFeatReq()) {
            if(freq.selected == true) {   
                Opportunity_Feature_Request__c OppFeatReq = new Opportunity_Feature_Request__c();


                OppFeatReq.Opportunity__c = theOpp.Id;
                OppFeatReq.Feature_Request__c = freq.oppFR.Id;
                //OppFeatReq.add(nal);
            	insert OppFeatReq;
            }
            
        }
            
        return new PageReference('/apex/quoteEditAssociatedSite?quoteId='+ApexPages.currentPage().getParameters().get('quoteId'));
    }
    
        public class ofrJO {
        public Feature_Request__c FeaReq {get; set;}
        public Opportunity opp {get; set;}
        public Opportunity_Feature_Request__c oppFR {get; set;}
		public Boolean selected {get; set;}
   		
        public ofrJO(Feature_Request__c fr){
            FeaReq = fr;
        }
            
       	public ofrJO(Opportunity o){
            opp = o;
        }        
        
        public ofrJO(Opportunity_Feature_Request__c ofr){
            oppFR = ofr;
    	}
         
    }   
}

 
Best Answer chosen by wadams2010
badibadi
Instead of using {!ofrJO} in visualforce use {!featReqList}.