struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravi_eze <ravi_...@yahoo.com>
Subject conversion is not happening for nested properties of action class; (XW-297
Date Sat, 22 Dec 2007 03:51:03 GMT

hi,

issue: An action class has a dto(say EmployeeDto) in it. In a particular
scenario (when object to string is happening) we are finding that
dto-conversion.porperties (EmployeeDto-conversion.properties) is being
called instead of actionClass-conversion.properties. This shouldn't happen
according to documentation.

details:
i am trying to write a custom converter for Long in struts2 framework which
internally uses xwork framework for the same. This class contains dto object
which furter has longFieldName as long data type. I created the actionname
-conversion.properties file which contains
dto.longFieldName=path.LongConverter entry in it. The LongConverter extends
StrutsTypeConverter which internally extends DefaultCOnverter .

What i observed is that stringToObject method of LongCOnverter is being
called by XWorkConverter but for objectTOString LongConverter is not being
called! After sufficient investigation and debugging the source code i
discovered that the XWorkConverter is expecting dto-conversion.properites
file for ObjectToString conversion and ActionClass-conversion.properties for
stringToObject conversion. I am not understanding as to why this is
happening. The XW-297 issue puts forward the same issue but it seems like
this is working partially now!

any ideas where i am going wrong? pl: help.

-- 
View this message in context: http://www.nabble.com/conversion-is-not-happening-for-nested-properties-of-action-class--%28XW-297-tp14466052p14466052.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message