You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by 中川 耕一 <na...@yahoo.co.jp> on 2003/05/16 07:41:03 UTC
Map-backed ActionForm and checkbox/multiple select
Hi
I am using Map-backed ActionForm for checkbox inputs and
multiple select inputs like the following.
<input type="checkbox" name="value(checkKey)"
maxlength="20" size="20" value="ABC"> ABC
<input type="checkbox" name="value(checkKey)"
maxlength="20" size="20" value="DEF"> DEF
<select name="value(selectKey)" multiple>
<option value="c">Alt1</option>
<option value="d">Alt2</option>
<option value="e">Alt3</option>
</select>
public FooForm extends ActionForm {
private final Map values = new HashMap();
public void setValue(String key, Object value) {
values.put(key, value);
}
public Object getValue(String key) {
return values.get(key);
}
}
However, I could not get String[] Object as a return value
of getValue(String key) method. Instead, I got a String
Object selected the first.
Is this the spec. of Struts? If yes, is there any plan
that Map-backed ActionForm returns String[] for the above
case?
regards,
--
Koichi
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org