struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Evans <dsevan...@gmail.com>
Subject ognl syntax to populate maps
Date Fri, 07 May 2010 00:38:58 GMT
Hello,

I am trying to populate a HashMap property of an action.

I am using straight jstl in a form with a textbox like this:
 <input type="textbox" name="rankMap['${business.id}']" size="5" value="10" />

My action has a rankMap property with a getter and setter.

The map is being populated, but when I fetch the value from the map it
returns a String[] instead of a String.
If I then get the first item of that array, the proper value is there:

String[] rankArray = (String[]) rankMap.get(businessId);
String rank = rankArray[0];


Am I doing something wrong, or is that just how ognl works?

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message