You need to sign in to do that
Don't have an account?

apex:dynamicComponent - Setting value to selectRadio
I have created a dynamicComponent which constructs a selectRadio with options. everything is good so far, but i am unable to set a value on load. For eg, I already have a preselected value which i need to dynamically show as selected for one of the option.
When i debug the sltRadio.value, it shows up correctly, however the value is not selected on page. Appreciate any help in this regard.
When i debug the sltRadio.value, it shows up correctly, however the value is not selected on page. Appreciate any help in this regard.
public String selectedValue {get;set;} Component.Apex.selectRadio sltRadio = new Component.Apex.selectRadio(); for(String option : lstString){ Component.Apex.selectOption so = new Component.Apex.selectOption(); so.itemValue = option; so.itemLabel = option; sltRadio.childComponents.add(so); } sltRadio.value = selectedValue; myTab.childComponents.add(sltRadio);