You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/07/17 12:02:40 UTC
DO NOT REPLY [Bug 21679] New: -
Map-backed ActionForms - multiple select - object value conversion
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: struts-dev@jakarta.apache.org
ReportedBy: agjedrus@yahoo.com
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: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org