You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by saint_john <sa...@mail.ru> on 2008/01/15 20:09:48 UTC
Strange behaviour -- [s:property] modifies Map???
Hi,
I've encountered very strange behaviour of struts:
<s:property value="myMap['testKey']"/> adds new entry to myMap - ('testKey',
''). Why??
Details:
...in My action:
private Map<String, String> myMap = new HashMap<String, String>(); // it's
empty
...in jsp:
<s:property value="myMap"/> // displays {} - it's ok because is empty
<s:property value="myMap['testKey']"/> // displays nothing as it should
be
<s:property value="myMap"/> // displays {testKey=} - ?? WHY?
What's wrong?
Thanks
--
View this message in context: http://www.nabble.com/Strange-behaviour-----s%3Aproperty--modifies-Map----tp14844942p14844942.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org