I have a wrapper class which contains a list of sobjects, i want to have th sorting on the fields of these objects in the wrapper list: The apex code is as follows:
Class jobsWrapper {
public JobSuite__Job__c job { get; set; }
public JobSuite__Job_Task__c jobTasks { get; set; }
public JobsWrapper(JobSuite__Job__c objjobs, JobSuite__Job_Task__c objjobTasks) {
// if(jobTasks== NULL){jobTasks = new List<Job_Task__c>();}
job = objjobs;
jobTasks = objjobTasks;
}
public JobsWrapper() {
if(jobTasks== NULL) {
jobTasks = new JobSuite__Job_Task__c();
}
if(job == NULL) {
job = new JobSuite__Job__c();
}
}
}
I want to allow sorting the wrapper list by the fields in the job - like client, jobname, jobnumber etc and fields from the task object as taskname, reviseddue dateetc.
How can I do this? Please help, thanks in advance.