title: Visualforce 'Conversion Error setting value' -- binding problem with selectCheckboxes
body: <p>I am getting a 'Conversion error setting value' when I try to save a record in my controller extension. The page looks the way I would expect, but when I select one or more checkboxes, it gives my that error. I'm not seeing what the error is here. Thanks for the help.</p>
  
  <p>The page:</p>
  
  <pre><code>          &lt;apex:pageBlockSectionItem &gt;
                  &lt;apex:OutputLabel value="Assigned Areas of Coverage" for="books" /&gt;
                  &lt;apex:selectCheckboxes value="{!selectedBooks}"
                      layout="pageDirection" id="books"&gt;
                      &lt;apex:selectOptions value="{!options}" /&gt;
                  &lt;/apex:selectCheckboxes&gt;
              &lt;/apex:pageBlockSectionItem&gt;
  </code></pre>
  
  <p>The controller:</p>
  
  <pre><code>public String[] selectedBooks {get; set;}
  
  public List&lt;SelectOption&gt; options 
  {
      get
      {
          List&lt;SelectOption&gt; result = new List&lt;SelectOption&gt;();
          List&lt;String&gt; optionNames = bookNames(books);
          optionNames.sort();
  
          for(String n : optionNames){
              if(!blacklist.contains(n)){
                  result.add(new SelectOption(n, n));
              }
          }
  
          return result;
      }
  }
  
  private List&lt;Book__c&gt; books 
  {
      get 
      { if (books == null){
          books =   [select Id, Name from Book__c];
          }
          return books;
  
      }
      set;    
  }
  
  private List&lt;String&gt; bookNames(List&lt;Coverage__c&gt; coverage)
  {
      List&lt;String&gt; result = new List&lt;String&gt;();
  
      for(Coverage__c c : coverage){
          result.add(c.Book__r.Name);
      }
  
      return result;
  }
  
  private List&lt;String&gt; bookNames(List&lt;Book__c&gt; books)
  {
      List&lt;String&gt; result = new List&lt;String&gt;();
  
      for(Book__c b : books){
          result.add(b.Name);
      }
  
      return result;
  }
  
  private List&lt;Id&gt; bookIDs(List&lt;String&gt; bookNames)
  {
      List&lt;Id&gt; result = new List&lt;Id&gt;();
      Set&lt;String&gt; bookNamesSet = new Set&lt;String&gt;(bookNames);
  
      for(Book__c b : books){
          if(bookNamesSet.contains(b.Name)){
              result.add(b.Id);
          }
      }
  
      return result;
  } 
  </code></pre>