You need to sign in to do that
Don't have an account?
SFDCRK
selectList as selectPickList?? dynamic picklist
Hi,
I am trying to create a dynamic pick-list values and populate the selectList component, is there a way to show the component as pick-list view instead of list view?
OR
Basically what I am trying to do create a dynamic pick-list field but looping thru the a table (ratecard).
Any help is greatly appreciated.
Thanks,
rk
<!-- Setting the size to 1 will change the list to a drop down -->
<apex:selectList value="{!countries}" size="1" required="true" id="cbo_selectValue">
<apex:selectOptions value="{!items}" />
</apex:selectList>
</apex:pageBlockSectionItem>
public String[] countries {get; public set; }
public List<SelectOption> getItems() {
List<SelectOption> options = new List<SelectOption>();
options.add(new SelectOption('US','US'));
options.add(new SelectOption('CANADA','Canada'));
options.add(new SelectOption('MEXICO','Mexico'));
return options;
}