I've been over the code a thousand times but cannot work out why the getVenueLst() method is not populating the SelectList on the vf page. Anyone have any ideas?
Controller
Public string selectedVenue {get;set;}
Public List<Selectoption> VenueLst {get;set;}
Public List<SelectOption> getVenueLst(){
List<SelectOption> venueoptions = new List<SelectOption>();
venueoptions.add(new SelectOption('All','All'));
for(Training_Venue__c ven : [select name from Training_Venue__c order by name])
{
venueoptions.add(new SelectOption(string.valueOf(ven), string.valueOf(ven)));
system.debug('Venue to add to SelectOption is '+ven);
}
return venueoptions;
}
VF Page
<div id="venueselect">
<outputText>Venue Filter: </outputText>
<apex:selectList value="{!selectedVenue}" style="width:220px" size="1" id="venue">
<apex:selectOptions value="{!VenueLst}"/>
</apex:selectList>
</div>
The page and controller have additional code but it shouldnt cause this not to work.