title: Binding spring:checkboxes to enumset on submit causes error
body: <p>Just a heads up, I am using Java and Spring for a web app.</p>
  
  <p>I have an object (objectBean) that contains an EnumSet (enumSet) of type EnumInnerObject as an attribute.  I am passing this object as a bean from my controller to my .jsp view.  I use the following .jsp code to bind the checkboxes:</p>
  
  <pre><code>&lt;form:form commandName="objectBean" name="whatever" action="./save.htm" method="post"&gt;
      &lt;form:checkboxes items="${allOptions}" path="enumSet" /&gt;
  &lt;/form:form&gt;
  </code></pre>
  
  <p>Here is my controller initbinder:</p>
  
  <pre><code>@InitBinder
  protected void initBinder(WebDataBinder binder) throws Exception{
      binder.registerCustomEditor(EnumSet.class, "enumSet", new CustomCollectionEditor(Collection.class){
          protected Object convertElement(Object element){
              if(element instanceof String){
                  EnumInnerObject enumInnerObject= EnumInnerObject.valueOf((String)element);
                  return enumInnerObject;
              }
               return null;
           }
       });
  </code></pre>
  
  <p>In the controller, I pass allOptions (separate from my bean), and this contains all EnumInnerObject options, so all the checkboxes are displayed.  "enumSet" is the EnumSet attribute with the appropriate values contained (if the value is contained in EnumSet, then it automatically checks the correct box in "allOptions").  All of this works and the .jsp correctly shows the correct checked boxes.  However, the problem is when I submit the page to save.  I get the following error:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String[]] to required type [java.util.EnumSet] for property 'enumSet': PropertyEditor [com.example.controller.MyController$1] returned inappropriate value]
  </code></pre>
  
  <p>I have a feeling I have to modify the InitBinder to get the form submit to work.  Any ideas??</p>
  
  <p>Thanks!</p>