struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandeep Takhar <sandeep_tak...@yahoo.com>
Subject Re: Multiple Select Problem
Date Sun, 23 Jun 2002 22:57:23 GMT
try using an array list.  I think you need something
that can be converted to an iterator??

sandeep
--- Dave Weis <djweis@sjdjweis.com> wrote:
> 
> Hello
> 
> I'm trying to make a multiple select on a form. I
> can't seem to get the
> correct type signatures on the getter and setter in
> the form. When I
> make them both Vectors like this:
> 
>     public void setColors(Vector colors) {
>         this.colors = colors;
>     }
> 
>     public Vector getColors() {
> 	    return colors;
>     }
> 
> the form loads fine, but submitting it gives me this
> error:
> java.lang.IllegalArgumentException: argument type
> mismatch
> 	at java.lang.reflect.Method.invoke(Native Method)
> 	at
>
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1574)
> 	at
>
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1468)
> 	at
>
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1498)
> 	at
>
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:613)
> 	at
>
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:952)
> 	at
>
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:795)
> 	at
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:244)
> 	at
>
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
> 	at
>
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
> 	at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
> 	at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
> 	at
>
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
> 	at
>
com.caucho.server.http.Invocation.service(Invocation.java:311)
> 	at
>
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
> 	at
>
com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:342)
> 	at
>
com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:272)
> 	at
>
com.caucho.server.TcpConnection.run(TcpConnection.java:137)
> 	at java.lang.Thread.run(Thread.java:484)
> 
> Inside the action that leads to the form, I put a
> list of all the colors
> that should be in the list in a request attribute
> called COLORS. This is
> what my jsp looks like:
> 
> <tr>
> <td align="right">Colors</td>
> <td><html:select property="colors" multiple="true" >
> <html:options collection="COLORS" property="id"
> labelProperty="name" />
> </html:select>
> </td>
> </tr>
> 
> COLORS is holding a Vector of Color objects that
> contain an int and a
> String for id and name. The select appears correct,
> but there are no
> options selected. Any ideas?
> 
> dave
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message