Need to pass a String array to a Set
<p>Hello guys I need to pass a string array over to a setter that takes a Set. Not sure how to pass it over. Thanks</p>

<p>THis is my form:</p>

<pre><code>  public String[] getFields() { return fields; }
public void setFields(String[] s) 
{ 
    fields = s; 
    //System.out.println("form Array length " + s.length);  
}
</code></pre>

<p>and here is the bean:</p>

<pre><code>private Set&lt;FieldBean&gt; fields;

   public void setFields( Collection&lt;FieldBean&gt; val )
{
    t
    if( fields == null ) fields = new HashSet&lt;FieldBean&gt;();
    fields.addAll( val );
}
</code></pre>

<p>Action code:</p>

<pre><code>ParameterBean paramBean = new ParameterBean();  
form.getFields()  y

        paramBean.setFields(Arrays.asList(form.getFields()));  //Need bean set here
</code></pre>

<p>got a message that stated: The method setFields(Collection) in the type ParameterBean is not applicable for the arguments (List)</p>
