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?
innerClass
. Also, you have several syntax errors in your code.