Right, request parameters are String/value pairs, but because Struts2 can convert these parameters to the right type through the getters/setters described in the action, I was wondering if this could be possible to do the same for the Map of parameters that I get through getParameters(). In this case, getFoo() and getParameters().get("foo") would return a value with the same type, that is not always a String. I'm using the parameters from this Map to build (in a generic action) another Map of the criteria that I send to the business part of the application. It's very much easy to convert from this Map (if the objects inside are typed and not only String) to my criteria than using bean introspection to get the parameters one by one. So does someone know if it is possible that the getParameters() Map contains typed values?
Thanks very much in advance. On 1/4/07, Dave Newton <[EMAIL PROTECTED]> wrote:
From: Sébastien LABEY [mailto:[EMAIL PROTECTED] > I know that getParameters().get("myParamater") returns an array of > objects, > but isn't it supposed to return not only String[], but arrays of > Objects > depending on the type described (if described) for the parameter > through > getter and setter in the action : if getId() returns an Integer, why > doesn't > getParameters().get("id") return an array of Integer, instead of an > array of > String? I thought that getParameters() via ParameterAware was just a wrapper around the request parameters, which are always name/value string pairs. I could be wrong, though; I'm well over par for stupid mistakes today. Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]