You need to sign in to do that
Don't have an account?
Dynamic Component and Radio Buttons
Hello. I am having issues getting radio buttons to appear in a series of tabs created via Dynamic Components.
In short, I am SUCCESSFULLY displaying a list of tabs from my Cars__c object (each tab is showing a unique occurrence of the Type__c value in the Cars__c object). However, I then want radio button displayed for each car name in the corresponding tab. Unfortunately, all I am seeing is the tab values - no radio button choices are being shown at all. Can anyone give me some guidance?
Thanks in advance. Below is my code - note the section marked where I am having problems.
public with sharing class myController { public List<Cars__c> ListA; public myController() { ListA = [SELECT Type__c, name, id FROM Cars__c WHERE Type__c<>null ORDER BY Type__c asc, name asc]; } public Component.Apex.TabPanel getCarTypeTab() { Component.Apex.TabPanel CarTypeTabPanel = new Component.Apex.TabPanel(title='Select type', switchType='client', tabClass='actveTab', inactiveTabClass='inactiveTab', style='padding:10px'); // Doing loop for one less than list size since we are comparing the next in line item for (Integer bEE = 0; bEE < ListA.size()-1; bEE++) { // identifying during the loop when a new type appears - and creating the corresponding tab // THIS ALL WORKS FINE if(ListA[bEE].Type__c<>ListA[bEE+1].Type__c) { Component.Apex.Tab miCatMember = new Component.Apex.Tab(); miCatMember.Label = string.valueOf(ListA[bEE].Type__c); CarTypeTabPanel.childComponents.add(miCatMember); } // HERE IS WHERE I AM HAVING PROBLEMS Component.Apex.selectRadio rdBtnSetup = new Component.Apex.selectRadio(); rdBtnSetup.id = 'selectRadio'; rdBtnSetup.layout = 'pageDirection'; Component.Apex.selectOption CARoption = new Component.Apex.selectOption(); CARoption.itemValue = ListA[bEE].id; CARoption.itemLabel = ListA[bEE].name; CARoption.itemDisabled = false; CarTypeTabPanel.childComponents.childComponents.add(CARoption); } return CarTypeTabPanel; } }