struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Burton Rhodes <burtonrho...@gmail.com>
Subject Re: [S2.2.1] Struts Type Converter for \"sub-model\" objects not working?
Date Thu, 20 Jan 2011 03:52:23 GMT
The only way for me to solve it was to add a separate variable in my
Action (e.g. "tempSubModel") that was of the same Type as the submodel
class.  Then in the receiving action, I just set the submodel variable
equal to tempSubModel.  (I'm sure that is clear as mud, but that's the
best way for me to describe it.)  I think it appropriate to open back
to the Struts mailing list...

Does anyone know why subclasses are not run through the type
conversion process in Struts?  IMHO, I think that this functionality
should be available  Here's an example [Action]-conversion.properties
file that you would think would work just fine.

	# Converts bigD in the ParentClass
	parentClass.bigD=com.test.web.converter.MyBigDecimalConverter
	
	# Converts bigD in the ChildClass (THIS DOES NOT WORK!)
	parentClass.childClass.bigD=com.test.web.converter.MyBigDecimalConverter

To better explain, I have attached a simple Struts 2/Maven app that
demonstrates the issue...

On Wed, Jan 19, 2011 at 4:00 PM, Dawid Zdanowicz <dejv@onet.eu> wrote:
> Hello,
> I have the same problem. Have you solved it ? I have noted that conversion
> of types boxing primitive types (java.lang.Integer, java.lang.Double) also
> doesn't work.
>
> Sincerly,
> Dawid Zdanowicz
>

Mime
View raw message