based on my previous message I want to have multiple-selects named off
of a hashmap.
I have found and read all the documentation of "Mapped Properties" I
could find under Google.
I know my form bean is 100% correct based on the documentation, so that
is a not a worry there.
I have a:
HashMap mapValues = null;
setMapValues(HashMap mapValues); returns HashMap with getMapValues()
setMapValue(String key, Object value) and finally
getMapValue(String key)
I created the HashMap in my preActionClass:
HashMap testMap = new HashMap();
testMap.put("a","value of a");
testMap.put("b","value of b");
testMap.put("c","value of c");
I tested this out in the jsp by using: <bean:write name="myFormBean"
property="getMapValue(b)" />
This does return "value of b" correctly.
I can even use a logic:iterate to loop through these three items and get
their key and values correctly!!!
Ultimately, I want three selects:
<select name="mapValues(a)"></select>
<select name="mapValues(b)"></select>
<select name="mapValues(b)"></select>
So ... now I created manually three selects on my jsp page.
<html:select name="myFormBean" property="mapValue(a)" value="not sure
yet"></html:select>
<html:select name="myFormBean" property="mapValue(b)" value="not sure
yet"></html:select>
<html:select name="myFormBean" property="mapValue(c)" value="not sure
yet"></html:select>
I just wanted to see if I could get my HashMap back to the post Action
and it constantly comes back null.
Can anyone help me deal with mapped properties, I am just not having any
luck and I've spent way too much time on this already.
Thanks!
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]