struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ryangr <>
Subject Re: Type conversion exceptions
Date Mon, 16 Mar 2009 19:04:14 GMT

Well I can't seem to find documentation or examples of how to use the
convertValue() API. This is what each call outputs (it seems both versions
get called each time the converter is run):

Called convertValue(Map, Object, Member, String, Object, Class)
target: com.rjssoft.webdocs.admin.SettingAction@12cb585
member: public void
propertyName: settings
value (java.util.ArrayList): []
toType: class com.rjssoft.webdocs.setting.SettingList

Called convertValue(Map, Object, Class)
context: ognl.OgnlContext@eb7f1c7f
o (java.util.ArrayList): []
toClass: class com.rjssoft.webdocs.setting.SettingList

It appears both values objects (value and o, respectively) are completely


ryangr wrote:
> That makes sense...I've added a converter for it similar to others that
> already exist in the app, but it doesn't appear to be calling
> convertFromString which the others use. Instead, it seems to be calling
> convertValue(Map, Object, Member, String, Object, Class) which I do not
> see in the Struts 2.0.14 API:
> Is there documentation on this somewhere that I'm missing? Is this what is
> supposed to be used? None of our other typeconverters use this method
> perhaps because it wasn't documented...
> Ryan
> Lukasz Lenart wrote:
>> 2009/3/16 ryangr <>:
>>> settings is a SettingList which is just an extended ArrayList<Setting>.
>> That can be a problem, generics are erased during compilation and Ognl
>> doesn't know how to convert array to SettingList, did you try to
>> prepare converter for it?
>> Regards
>> -- 
>> Lukasz
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:

View this message in context:
Sent from the Struts - User mailing list archive at

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

View raw message