title: Populate a dropdown in a visualforce page with a list of Strings
body: <p>I am trying to mimic the salesforce lead convert process. I have a visualforce page and a controller. The problem I am having is when the page loads the dropdown is blank. My goal is to have a list of strings and populate the dropdown with this list. I have searched high and low and can't figure out why the dropdown is blank. Here is my  code, any help is appreciated.</p>
  
  <p>--controller--</p>
  
  <pre class="lang-apex prettyprint-override"><code>public with sharing class LeadConvertController {
      public Lead l {get; private set;}
      public Account a {get; private set;}
      public list&lt;SelectOption&gt; options {get; set;}
      public String attachToclient {get;  set;}
  
      public LeadConvertController(ApexPages.StandardController sc) {
          for (Lead referral : [SELECT Id, Name, Phone, OwnerId
                                FROM Lead
                                WHERE Id = : sc.getId()]) {
              l = referral;
          }
  
          if (l == null) {
              system.debug(logginglevel.error, 'Missing lead');
          }
  
          //query by name and phone to find possible Existing Accounts or contact
          options = findExistingClients(l);
      }
      public list&lt;SelectOption&gt; findExistingClients (Lead leadToacc) {
          list&lt;SelectOption&gt; findClients = new list&lt;SelectOption&gt;();
          for (Account acc : [SELECT Id, Name, Type, Primary_Contact__c FROM Account WHERE                                               Name = :leadToacc.Name OR Phone = :leadToacc.Phone]) {
              findClients.add( new SelectOption(acc.Id, 'Attach to Existing: ' + acc.Name));
              a = acc;
          }
          for (Contact c : [SELECT Id, Name FROM Contact WHERE Name = :leadToacc.Name OR Phone = :  leadToacc.Phone]) {
              findClients.add(new SelectOption(c.Id, 'Attach to Existing: ' + c.Name));
          }
  
          findClients.add(new SelectOption(l.Name, 'Create new Client/Prospect: ' + l.Name));
          return findClients;
      }
  }
  </code></pre>
  
  <p>--visualforce page--</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;apex:page title="Lead Convert" standardController="Lead" tabStyle="Lead" extensions="LeadConvertController"&gt;
  &lt;apex:sectionHeader title="Convert Referral" subtitle="{!l.Name}"&gt;
      &lt;apex:outputPanel id="main" rendered="true"&gt;
          &lt;apex:form&gt;
              &lt;apex:pageBlock&gt;
                  &lt;apex:pageBlockButtons&gt;
                      &lt;apex:commandButton action="{!convert}" id="Convert" value="Convert" /&gt;
                      &lt;apex:commandButton action="{!cancel}" id="Cancel" value="Cancel" /&gt;
                  &lt;/apex:pageBlockButtons&gt;
                  &lt;apex:pageBlockSection title="Convert Referral" collapsible="false" columns="1"&gt;
                      &lt;apex:inputField label="Record Owner" value="{!l.OwnerId}" required="true" /&gt;
                      &lt;apex:pageBlockSectionItem&gt;
                          &lt;apex:outputPanel&gt;
                              &lt;apex:outputLabel value="Client/Prospect Name" /&gt;
                              &lt;apex:selectlist value="{!attachToclient}" required="true" /&gt;
                              &lt;apex:selectOptions value="{!options}" /&gt;
                              &lt;apex:outputlink title="View" value="{!a.Primary_Contact__c}"&gt;View&lt;/apex:outputlink&gt;
                          &lt;/apex:outputPanel&gt;
                      &lt;/apex:pageBlockSectionItem&gt;
                  &lt;/apex:pageBlockSection&gt;
              &lt;/apex:pageBlock&gt;
          &lt;/apex:form&gt;
      &lt;/apex:outputPanel&gt;
  &lt;/apex:sectionHeader&gt;
  &lt;/apex:page&gt;
  </code></pre>