AnswerBun.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!

Related Questions

Named Credential authentication with GoToWebinar (OAuth2)

1  Asked on September 13, 2020 by deployment-failure

       

standard controller with extension

1  Asked on September 6, 2020 by vivian

     

Using a literal string in SELECT statement

2  Asked on August 27, 2020 by ssk

 

Change Import File Logic

0  Asked on August 27, 2020 by joo

   

Dynamically get Modified fields in trigger

1  Asked on July 24, 2020 by user52080

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir