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
Charles McDowellCharles McDowell 

Unknown constructor 'ProjectExtensionController.ProjectExtensionController(ApexPages.StandardController controller)'

I am new to Salesforce.  I have a list of a custom object (Proje using StandardSetController.  I want a  button to navigate to the next page. I am getting the "Unknown constructor 'ProjectExtensionController.ProjectExtensionController(ApexPages.StandardController controller)'  Thanks in advance for your help

My Extension Class
public class ProjectExtensionController {

    
    Public ProjectExtensionController(Apexpages.StandardSetController Controller) {
           

    }
  
     Public PageReference EditRec(){
        ID id = System.currentPageReference().getparameters().get('ProjectID');
        PageReference ProjectDetail = Page.ProjectDetail;
        ProjectDetail.setRedirect(True);
        ProjectDetail.getParameters().get('id');
        return ProjectDetail;
    }
 }
_____________________Markup

<apex:page standardController ="Project__c" recordSetVar="Proj" extensions="ProjectExtensionController"  >
       <apex:form >
        <apex:pageBlock >
            <apex:pageBlockTable title="Project Datasheet" value="{!Proj}" var="p" >
                <apex:column >
                    <apex:commandLink value="{!p.name}" action="{!EditRec}">      
                        <apex:param Name="ProjectID" value="{!p.ID}" />
                    </apex:commandLink>
                </apex:column>
                
                   <apex:column value="{!p.Account__c}" /> 
                <apex:column value="{!p.Date__c}" />
                <apex:column value="{!p.Description__c}" />
                <apex:column value="{!p.Status__c}" />
                <apex:column value="{!p.City__c}" />
                <apex:column value="{!p.Project_Total__c}" />
       
            </apex:pageBlockTable>
            <!--{!$CurrentPage.parameters.ProjectID} -->
               
        <apex:pageBlockButtons >
             <apex:commandButton value="Cancel" action="{!Cancel}"  />
        </apex:pageBlockButtons>
    </apex:pageBlock>
    </apex:form>
  </apex:page>
NagendraNagendra (Salesforce Developers) 
Hi Charles,

This isn't actually a custom controller, but rather a controller extension.
 
If you don't need standard controller functionality (and it looks like you don't, since you're not referring to it anywhere), the correct syntax for the page tag is
<apex:page standardStylesheets="false" sidebar="false" Controller= "ProjectExtensionController">
If you're really trying to write a controller extension, then your extension needs to have a constructor that takes an argument of ApexPages.StandardSetController.
public ApexPages.StandardSetController stdCntrlr {get; set;}
 public ProjectExtensionController(ApexPages.StandardSetController controller) {
        stdCntrlr = controller;
    }
Hope this will help you with the above issue.

Kindly mark this as solved if it's resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.

Thanks,
Nagendra
 
Charles McDowellCharles McDowell
It worked, thank you so much
NagendraNagendra (Salesforce Developers) 
Hi Charles,

Kindly mark this as solved if it's resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.

Thanks,
Nagendra
Charles McDowellCharles McDowell
how do you mark it as solved?