commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <skitch...@apache.org>
Subject Re: [Digester] Method call order.
Date Fri, 03 Jun 2005 03:46:52 GMT
On Fri, 2005-06-03 at 10:38 +0800, Eugene.Ng@hbosa.com.au wrote:
> Greetings,
> 
> Decoder Rule XML:
> ...
> <pattern value="Party">
>   <object-create-rule
> classname="au.com.bankwest.ols.lixi.model.party.LIXIPartyLoader"/>
>   <call-method-rule methodname="setApplicationType" paramcount="1"
> paramtypes="au.com.bankwest.ols.reference.legalentity.LixiAssociation" />
>   <call-param-rule attrname="ApplicationType" paramnumber="0" />
>   <set-next-rule methodname="addParty" />
> </pattern>
> ...
> 
> Apparently the decoder always calls 'addParty' method BEFORE calling
> 'setApplicationType' resulting in an incomplete object being added. I've
> even tried moving <set-next-rule> to the top (based on the recommendations
> of this FAQ 'http://wiki.apache.org/jakarta-commons/Digester/FAQ' under
> 'How do I get CallMethodRule to fire before SetNextRule?') and it still
> gets called first. Anyone with experience on this please share your wisdom.

Moving the set-next-rule to before the call-method-rule *will* fix this
problem. I can't think of any reason why it wouldn't work for you.

But if you still have problems, I recommend enabling digester's logging
as described in the same FAQ and inspecting the output.

Regards,

Simon



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


Mime
View raw message