DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21679>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21679

Map-backed ActionForms - multiple select - object value conversion

           Summary: Map-backed ActionForms - multiple select - object value
                    conversion
           Product: Struts
           Version: 1.1 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Controller
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to