Hi Kedar,

perhaps you could expand upon your statement. What I understand is that the conversion involves the creation of the object graph based on the incoming HTTP param-value pair (e.g. instrument.market.id=1) as follows:

(1) id = new Long(1)
(2) market = new Market()
(3) market.setId(id)
(4) instrument = new Instrument()
(5) instrument.setMarket(market)


In steps (2) and (4), my assumption is that OGNL will call my TypeConverter which I have registered in xwork-conversion.properties to handle those classes.

Are you implying that OGNL will only delegate to the TypeConverter when dealing with the last name in the parameter string (in my case 'id' which is Long)?

Regards
Adam

Kedar Choudhary on 24/02/08 06:10, wrote:
There is not type conversion to be done when setting value of
instrument.market.id.
S2 will call your type converter if you were setting value of
instrument.market.

Regards
Kedar

-----Original Message-----
From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Sunday, February 24, 2008 1:02 AM
To: Struts Users Mailing List
Subject: Re: xwork-conversion.properties

Adam Hardy on 22/02/08 17:32, wrote:
I wrote a TypeConverter and configured S2 with xwork-conversion.properties to use it so:


org.permacode.patternrepo.domain.Market=org.permacode.atomic.web.DomainObjec
tTypeConverter

as per the wiki.

However, from debugging it looks as though struts is completely ignoring the TypeConverter and instantiating my Market objects as it needs them from scratch, for instance with nested objects in my form:

instrument.market.id=13

What am I doing wrong? I use the ParamsInterceptor. Should I be using a different interceptor?

This issue is proving very difficult to solve and so far I haven't been able
to work out from debugging xwork and ognl what exactly is going wrong.

It appears to be just this action which ignores my TypeConverter. Other
actions are working fine with it. They have no extra config - it is only set in the global xworks-conversion.properties file.

Has anyone else ever come across such a situation?


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

Reply via email to