You need to sign in to do that
Don't have an account?
SelectCheckboxes component issue
Hello,
I've got a selectcheckboxes component on a VF page;
<apex:pageBlockSection title="Product" columns="2">
<apex:pageBlockSectionItem >
<apex:outputText value="{!$ObjectType.Household_Search__c.fields.PolicyType__c.label}"/>
<apex:selectCheckboxes value="{!policyTypes}" layout="pageDirection">
<apex:selectOptions value="{!policyTypeOptions}"/>
</apex:selectCheckboxes>
</apex:pageBlockSectionItem>
And the associated controller;
// Multi-select search properties
public List<String> policyTypes {get;set;}
public List<SelectOption> policyTypeOptions {get{return getOptions(Household_Search__c.PolicyType__c.getDescribe());}}
private List<SelectOption> getOptions(Schema.DescribeFieldResult f) {
List<SelectOption> options = new List<SelectOption>();
for (Schema.PicklistEntry entry : f.getPicklistValues()) {
options.add(new SelectOption(entry.getLabel(), entry.getValue()));
}
return options;
}
When I save the page, I'm receiving the following error;
Any ideas?
Many thanks,
Dan