2
저는 Visualforce 페이지에서 사용자 정의 객체의 데이터를 표시하는 컨트롤러를 구축하고 있습니다. 수업은 다음과 같습니다.Salesforce - 생성자 이름 오류가 잘못되었습니다.
public class myController {
Opportunity opp;
list<Leg__c> legs;
public Opportunity getOpp() {
if(opp == null)
opp = [select name, Primary_Contact__r.name, Primary_Contact__r.email, Primary_Contact__r.phone from Opportunity
where id = :ApexPages.currentPage().getParameters().get('id')];
return opp;
}
public getLegs() {
legs = [select Departure__c, Arrival__c from Leg__c
where Opportunity__c = :ApexPages.currentPage().getParameters().get('id')];
}
}
컴파일 할 수 없습니다. 나는 계속 간다.
Error: myController Compile Error: Invalid constructor name: getLegs at line 12 column 12
내가 뭘 잘못하고 어떻게 해결할 수 있니?
Perfect! 나는 실제로 내가 꼭 필요한 기능을 사용한다고 생각하지 않았다. –