commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abbas Adel" <b...@tantawi.net>
Subject String[] to Set Converter
Date Thu, 01 Feb 2007 17:53:33 GMT
 

I want to Convert String[] to a java.util.Set

 

This is my User bean

 

 public class User extends org.apache.struts.action.ActionForm {

     

     private String name;

     private Set values;

 

     public String getName() {

         return name;

     }

 

     public void setName( String name) {

         this.name = name;

     }

 

     public Set getValues() {

         return values;

     }

 

     public void setValues(Set values) {

         this.values = values;

     } 

 }

 

My struts form

 

<html:form action="/post">

     <html:text property="name"/>

     

     <html:select property="values" multiple="true">

         <html:option value="1"/>

         <html:option value="2"/>

         <html:option value="3"/>

         <html:option value="4"/>

         <html:option value="5"/>

         

       <html:submit />

     </html:select>

 </html:form>

 

 

Thanks in advance

 

BISO

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message