I got null
value for agreementId when I try to type it
Apex Class
public class selectedTasks {
private final List<agreement__c> agreementTasks;
public String agreementId {set;get;}
public agreement__c selectedAgreement {set;get;}
private String finalQuery = '';
public selectedTasks() {
try{
agreementTasks = [SELECT name FROM agreement__c WHERE Id =:agreementId ];
} catch(Exception e){
errorMessage = 'Id : '+agreementId;
}
}
}
VF Component
<apex:component controller="selectedTasks" access="global">
<apex:attribute assignTo="{!agreementId}"
name="agrId" type="String"
description="Agreement ID"
access="global"
required="true"/>
{!errorMessage}
</apex:component>
VF Page
<apex:page >
<c:Partner_Tasks_Component agrId="a0Z25000001cSXG" />
</apex:page>
selectedTasks()
begetSelectedTasks()
to be usable in VF component?