0
사용자 지정 VF 구성 요소를 추가하여 일괄 작업 세부 정보를 페이지 블록 테이블에 표시하려고합니다. 그러나 내 구성 요소를 절약, 그것은 말한다 : 오류 : 읽기 전용 속성 'c : batchDetailsComponent.BatchJobDetails' 도와주세요.Visualforce 사용자 정의 컴포넌트에서 페이지 블록 테이블을 사용하는 방법은 무엇입니까?
<apex:component controller="BatchOpportunityDetailsExtension">
<apex:attribute name="batchJob" type="List" assignTo="{!BatchJobDetails}" description="" />
<apex:form >
<apex:pageBlock>
<apex:pageblockTable value="{!batchJob}" var="batch">
<apex:column value="{!batch.CompletedDate}"/>
<apex:column value="{!batch.JobItemsProcessed}"/>
<apex:column value="{!batch.NumberOfErrors}"/>
</apex:pageblockTable>
</apex:pageBlock>
</apex:form>
</apex:component>
VF 페이지 :
이
은없이 VisualForce 구성 요소입니다<apex:page standardController="Opportunity_Scheduled_Information__c"
extensions="BatchOpportunityDetailsExtension">
<c:oppScheduleComponent componentValue="{!batchJob}"/>
</apex:page>
컨트롤러 :
public class BatchOpportunityDetailsExtension {
public List<AsyncApexJob> batchJobDetails = new List<AsyncApexJob>();
public Opportunity_Scheduled_Information__c pageController {get;set;}
public BatchOpportunityDetailsExtension() {}
public BatchOpportunityDetailsExtension(ApexPages.StandardController controller) {
controller.addFields(new List<String>{'Total_Amount__c', 'Number_of_Opportunities__c'});
pageController = (Opportunity_Scheduled_Information__c)controller.getRecord();
BatchJobDetails = [ SELECT id,ApexClassID,CompletedDate,JobType,JobItemsProcessed,NumberOfErrors,MethodName,Status,ExtendedStatus,TotalJobItems FROM AsyncApexJob WHERE ApexClassId='01p7F000000bKIlQAM' LIMIT 50] ;
}
public List<AsyncApexJob> getBatchJobDetails()
{
return BatchJobDetails ;
}
}