Rick Reumann wrote the following on 7/14/2005 3:17 PM:
Ok this is basic, but I'm stumped here at the moment...
Imagine a Map of Animals. (Animal has a "name" property)
map.put(new Integer(1), new Animal() );
map.put(new Integer(2), new Animal() );
In my Action form this map is in there as:
private Map animalsMap;
getAnimalsMap()
setAnimalsMap(Map map);
Question:
In this example I know the key names (1 and 2). I want to be able to
update the "name" for each animal that is in the map from a form:
<html:text property="animalsMap[1].name"/>
<html:text property="animalsMap['1'].name"/>
<html:text property="animalsMap[2].name"/>
From the FAQ I'm going to try this in my ActionForm..
public Object getStringMapped(String key) {
return map.get(key);
}
public void setStringMapped(String key, Object value) {
map.put(key, value);
}
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]