VF
<apex:dynamicComponent componentValue="{!DynamicPicklist}"/>
Apex
public List<MyWrapperClass> lstPicklistValues{get;set;}
public Component.Apex.repeat getDynamicPicklist() {
Component.Apex.repeat myDetailList= new Component.Apex.repeat(var='l');
myDetailList.expressions.value = '{!lstPicklistValues}';
Component.Apex.OutputLabel theLevelLabel = new Component.Apex.OutputLabel();
theLevelLabel.value = '{!l.level.Value__c}';
myDetailList.childComponents.add(theLevelLabel);
return myDetailList;
}
The above code displays as below,
{!l.level.Value__c} {!l.level.Value__c} {!l.level.Value__c} {!l.level.Value__c} {!l.level.Value__c}
Its not fetching value instead its hardcoded with '{!l.level.Value__c}'
please help! i am stuck with this since long time
getDynamicPicklist
method executes there is no{!}
substitution mechanism or context available: that is only available in a Visualforce page or component. I suggest looking for a non-dynamic component solution; if you can't find one your can post another question that explains what you are trying to accomplish. – Keith C Jun 2 '15 at 12:51