You need to sign in to do that
Don't have an account?
i need help with connecting my apex controller with the my visualforce component
Here is my Apex Class:
public class jobApplicationTempt{
public Id JobApplicationId {get;set;}
public List<Job_Application__c> getJobApplication(){
List<Job_Application__c> listOfJobApp;
listOfJobApp=[SELECT Position__r.Name, Name__c, Phone__c, Email__c From Job_Application__c WHERE status__c = 'Approved' ];
return listOfJobApp;
}
}
and this is my VF Component:
<apex:component controller="jobApplicationTempt" access="global">
<apex:attribute name="JobAppId" type="Id" description="Id of the JobApplication" AssignTo="{!JobApplicationId}"/>
<table border="2" cellspacing="5">
<tr>
<td>Position Name</td>
<td>Candidate Name</td>
<td>Candidate Phone</td>
<td>Candidate Email</td>
</tr>
<apex:repeat value="{!JobApplications}" var="o">
<tr>
<td>{!o.Position__r.Name}</td>
<td>{!o.Name}</td>
<td>{!o.Phone}</td>
<td>{!o.Email}</td>
</tr>
</apex:repeat>
</table>
</apex:component>
<apex:page>
<c:VF_cmponent/>
</apex:page>