TransWikia.com

Inner class property not seen in visualforce dynamic component

Salesforce Asked by 84079616ytreza on September 5, 2020

Apex Class

public class outterClass(){
    // set properties
    public List<innerClass> inners {get; set;}

    outterClass(){
        // set inners list values
        inners = new public List<innerClass>{ inner1, inner2};
        for(innerClass inner : inners){
            inner.repeatService = new Component.Apex.Repeat(); // add some value in repeatService 
        }

    }
    
    public class innerClass(){
       // set properties
       public Component.Apex.Repeat repeatService {get; set;}
       public Component.Apex.Repeat getRepeatService(){
           System.debug('Execute get...');
           return this.repeatService;
       }
    }
}

Visualforce page

   <apex:page controller="outterClass">
       <apex:repeat var="inner" value="{!inners}">
           <apex:dynamicComponent componentValue="{!inner.repeatService}"/>
       </apex:repeat>
   </apex:page>

getRepeatService is not executed…Why?

One Answer

I just added invokeAfterAction="true" to my visualforce component and it works.

Answered by 84079616ytreza on September 5, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP