You'd need to either register a converter with BeanUtils that knows how to convert the enum type to String, or just do this:

  PropertyUtils.setProperty(context.getForm(), "status",
    Status.ACTIVE.toString());

L.

Deepa Umakanth wrote:
Error:
Caused by: org.apache.commons.beanutils.ConversionException: Cannot
assign value of type 'com.kryterion.wa.util.enums.Status' to property
'status' of type 'java.lang.String'

PropertyUtils.setProperty(context.getForm(), "status", Status.ACTIVE);

-----Original Message-----
From: Deepa Umakanth [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 12, 2006 9:12 AM
To: user@struts.apache.org
Subject: conversionexception

I am facing an error with PropertyUtils.getProperty(),

Which is :

Caused by: org.apache.commons.beanutils.ConversionException: Cannot
assign value of type enum object to property 'status' of type
'java.lang.String'

Please advice



---------------------------------------------------------------------
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]

Reply via email to