• Mauricio Ramos 16
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello,

I am having trouble showing a wrapper variable in a pageblocktable that iterate over a list of wrapper class objects. The structure is as follow, I have a aLeadRatingResult wrapper class with a list variable of another wrapper class (BusinessInfo). I managed to create the table to iterate over the BusinessInfo list but I keep getting an error when trying to access the variables in it...

controller
public with sharing class LeadRatingResultsView {
        public Lead ld {get;set;}
        public LeadRatingResult leadResults {get;set;}
        public LeadRating_BusinessInfo[] leadBusinessInfo {get{return leadResults.BusinessInfo;}set;}

    public LeadRatingResulstsView(ApexPages.StandardController controller) {
        controller.addFields(new List<String> {'Rating_Result_JSON__c'});
        ld = (lead) controller.getRecord();
        leadResults = (LeadRatingResult)JSON.deserialize(ld.Rating_Result_JSON__c, LeadRatingResult.Class);
    }
}
VF page:
<apex:page standardController="Lead" extensions="LeadRatingResulstsView">
 <apex:detail inlineEdit="true" relatedList="false" />
 <apex:pageBlock >
     <apex:pageBlockTable id="pgblkTbl" value="{!leadBusinessInfo}" var="bi">
         <apex:column headerValue="Id" >
             <apex:outputText  value="{!bi.Id}"/>
         </apex:column>
         <apex:column value="{!bi.ABN}" headerValue="ABN" />
         <apex:column value="{!bi.RatingAccuracy}" headerValue="Rating Accuracy" />
     </apex:pageBlockTable>
 </apex:pageBlock>
</apex:page>

ANY IDEAS AS TO WHAT COULD BE CAUSING THE FOLLOWING ERROR MSG: pages/LeadRatingResultsView.page: Unknown property 'LeadRating_BusinessInfo.Id'
Hello,

I am having trouble showing a wrapper variable in a pageblocktable that iterate over a list of wrapper class objects. The structure is as follow, I have a aLeadRatingResult wrapper class with a list variable of another wrapper class (BusinessInfo). I managed to create the table to iterate over the BusinessInfo list but I keep getting an error when trying to access the variables in it...

controller
public with sharing class LeadRatingResultsView {
        public Lead ld {get;set;}
        public LeadRatingResult leadResults {get;set;}
        public LeadRating_BusinessInfo[] leadBusinessInfo {get{return leadResults.BusinessInfo;}set;}

    public LeadRatingResulstsView(ApexPages.StandardController controller) {
        controller.addFields(new List<String> {'Rating_Result_JSON__c'});
        ld = (lead) controller.getRecord();
        leadResults = (LeadRatingResult)JSON.deserialize(ld.Rating_Result_JSON__c, LeadRatingResult.Class);
    }
}
VF page:
<apex:page standardController="Lead" extensions="LeadRatingResulstsView">
 <apex:detail inlineEdit="true" relatedList="false" />
 <apex:pageBlock >
     <apex:pageBlockTable id="pgblkTbl" value="{!leadBusinessInfo}" var="bi">
         <apex:column headerValue="Id" >
             <apex:outputText  value="{!bi.Id}"/>
         </apex:column>
         <apex:column value="{!bi.ABN}" headerValue="ABN" />
         <apex:column value="{!bi.RatingAccuracy}" headerValue="Rating Accuracy" />
     </apex:pageBlockTable>
 </apex:pageBlock>
</apex:page>

ANY IDEAS AS TO WHAT COULD BE CAUSING THE FOLLOWING ERROR MSG: pages/LeadRatingResultsView.page: Unknown property 'LeadRating_BusinessInfo.Id'