Hi Sami, There is an example in the showcase webapp which shows how to convert to/from enums. Give a look, that it might help you.
[]s Daniel 2007/2/11, Sami Dalouche <[EMAIL PROTECTED]>:
Hi, I've been trying to bind Java 5 enums, but I get some weird problem.... xwork-conversion.properties java.lang.Enum = funala.web.action.typeconverters.TestTypeConverter TestTypeConverter extends EnumTypeConverter and just adds some logs, to make sure the converter is actually used. (I get the same problem by using the EnumTypeConverter directly) So, the weird thing is that binding from the Enum to String works perfectly, but the opposite doesn't work.. (the Enum is SexTraitType, and contains MALE, FEMALE) [INFO] [2007-02-11 20:58:39,959] [funala.web.action.typeconverters.TestTypeConve rter] (btpool0-3,) : convertValue: [Ljava.lang.String;@16bfded:class funala.doma in.entity.profile.traitTypes.SexTraitType [INFO] [2007-02-11 20:58:39,959] [funala.web.action.typeconverters.TestTypeConve rter] (btpool0-3,) : convertFromString: FEMALE:class funala.domain.entity.profil e.traitTypes.SexTraitType [ERROR] [2007-02-11 20:58:39,964] [com.opensymphony.xwork2.interceptor.Parameter sInterceptor] (btpool0-3,) : ParametersInterceptor - [setParameters]: Unexpected Exception catched: Error setting expression 'sexTrait' with value '[Ljava.lang. String;@16bfded' (and I do have my get/set sexTrait() on the action. { .. } Does anyone know what could cause the problem ? Thanks for your help, Sami Dalouche --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]