Indeed, the problem is that EnumTypeConverter, as provided by Struts2  only
works for single values.

Can you make selectedNutrients a List?

If so, you might be able to use the EnumTypeConverter from the showcase app,
or roll your own based off it, which isn't that hard at all.

org.apache.struts2.showcase.conversion.EnumTypeConverter

hth,
-a



Guillaume Bilodeau wrote:
> 
> Yes I tried that, with no success unfortunately.
> 
> Somehow we need to specify that:
> 1- selectedNutrients[] will need to be mapped to an array of Nutrients
> 2- each element of selectedNutrients[] must be mapped using
> EnumTypeConverter
> 
> 
> cilquirm wrote:
>> 
>> Are enums type-converted automatically now?
>> 
>> I recall early on I  had to specify
>> http://struts.apache.org/2.0.9/struts2-core/apidocs/com/opensymphony/xwork2/util/EnumTypeConverter.html
>> 
>> Have you tried specifying that?
>> 
>> with 
>> 
>> Element_selectedNutrients =
>> com.opensymphony.xwork2.util.EnumTypeConverter
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Mapping-multiple-enums-to-a-nested-object-tf4505238.html#a12885311
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to