struts-user mailing list archives

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

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['${}']" 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?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message