You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2007/08/22 08:32:34 UTC

[jira] Updated: (STR-1612) Map-backed ActionForms - multiple select - object value conversion

     [ https://issues.apache.org/struts/browse/STR-1612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Benedict updated STR-1612:
-------------------------------

    Fix Version/s: Future
         Assignee:     (was: Struts Developers)

> Map-backed ActionForms - multiple select - object value conversion
> ------------------------------------------------------------------
>
>                 Key: STR-1612
>                 URL: https://issues.apache.org/struts/browse/STR-1612
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1.0
>         Environment: Operating System: All
> Platform: All
>            Reporter: Andrzej
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: patchFor21679.txt
>
>
> We use multiple select input on my web UI. When we select two (or more) values 
> for one parameter (multiselect-select with options) only one value is 
> propagated to ActionForm (the first one), we lose others forever. We use Map-
> backed ActionForm:
> public class HashActionForm extends ActionForm{
>     static private Log logger = LogFactory.getLog(HashActionForm.class);
>     HashMap params = new HashMap();
>     public void setVal(String key, Object value){
>         logger.info("And we have: " + key + " : " + value.toString());
>         params.put(key, value);
>     }
>     public Object getVal(String key){
>         return params.get(key);
>     }
> }
> As far as we found the problem is with conversion of String[]. In current 
> version if request has a parameter with value of type String[], conversion 
> takes only first value of that parameter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.