You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Björn Thalheim <bj...@gmx.de> on 2007/10/30 10:47:18 UTC

[Betwixt] Converter and Setter not called

Hi,

I have a bean which has another bean as an attribute, with simple 
strings as attributes. The beans are both registered at the BeanReader 
(also all their superclasses, up to the superclass which extends 
Serializable).

Questions:
1. If a Bean has another Bean class as attribute, do I need to register 
the "attribute"-Bean at the BeanReader.
2. If the "attribute"-Bean has attributes which are defined in a 
superclass of it, do I also need to register that superclass.

Problem:
Usually, when looking at the DEBUG log, parsing an attribute (XML 
content) happens like this:
-> Digester - New match='<TAG>'
-> Digester - Fire begin() for <MAPRULE>
-> Digester.sax - characters(<CONTENT>)
-> Digester.sax - endElement(<TAG>)
-> Digester - match='<TAG>'
-> Digester - bodyText='<CONTENT>'
-> Digester - Fire body() for <MAPRULE>
-> BeanRuleSet - [BRS] Body with text <CONTENT>
*-> TypedUpdater - Converting primitive to class String
*-> ConvertUtils - Converting string '<CONTENT>' to class 'String'
*-> ConvertUtils - Using convertter StringConverter
*-> MethodUpdater - Calling setter method: <SETMETHOD>
-> Digester - Popping body text
My problem is that the LOG entries marked with "*" are not appearing for 
the "attribute"-Bean. The rest looks quite equivalent, except that no 
namespace attributes are set for the "attribute"-Bean. Here's an example 
of this:
Not working: Digester - endElement(,Source,Source)
Working: Digester - endElement(http://<NAMESPACE>,Dest,tns:Dest)

More Questions:
3. Does anybody have a clue why the TypedUpdater and MethodUpdater 
classes of Betwixt are not invoked to do their job here? Any hint, when 
these are invoked and when not, would be helpful.

Regards,

Björn

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