struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Graham" <>
Subject Re: <html:select multiple="true" not working...
Date Wed, 19 Mar 2003 18:41:17 GMT
You can't use String[] inside a Map backed field.  The value will get 
overwritten by the next property of the same name in the map.  Use a 
String[] to support multi valued select boxes.


>From: "WILLIAMS,RAND (HP-USA,ex1)" <>
>Reply-To: "Struts Users Mailing List" <>
>To: 'Struts Users Mailing List' <>
>Subject: <html:select multiple="true" not working...
>Date: Wed, 19 Mar 2003 10:08:00 -0800
>Anyone tried this?
>Using a map backed form, where
>set(key,val) { mymap.put(key,val) }
>and get(key) { return mymap.get(key) }
>I am having a problem with String[] and multiple attribute of html:select:
><html:select property="value(selectProduct)" multiple="true">
>  <logic:iterate id="x" name="telecomModel" property="services" >
>   <bean:define id="y" name="x" property="product" />
>    <html:option value='<%=(String)y%>' />
>  </logic:iterate>
>Even though value(selectProduct) gives to the tag
>[INFO] SmModelForm - - getValue(selectProduct) = [Ljava.lang.String;@deb5f
>which is a String[0]
>The problem i see is beanUtils still populates the field with only a 
>[INFO] SmModelForm - - setValue(selectProduct,U3995)
>which is merely a String - not a String[] with an element (String) "U3995".
>Is there something wrong or am I missing something here??
>Is there an issue with retrieving or setting the String[] from a HashMap?
>Thanks in advance for help :)
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Add photos to your messages with MSN 8. Get 2 months FREE*.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message