Thomas,
Thomas Schoofs wrote:
Hi Ralf,
I believe I found the failure. Thank you for your Tip.
But this brings up my next question how I say castor to use the set or
add method?
I add a System.out.println to the methods getStyles, setStyles and
addStyles. The effect was that the methods setStyles and addStyles
never called from the castor framework,
You should be able to point Castor to the addMethod() manually by
specifying the 'set-method' attribute to carry teh name your add*()
method. In otehr words, if an add method is specified, Castor will use
it to add values to your collection.
but it calls 36 times the
getStyle method. In my example file are 35 styles defined and I
believe the last call is for the write out operation.
If you don't specify an add method, Castor will - for each addition to
the collection - call the corresponding add() method on your
collection., 35 times in your case. And yes, the last access of the
getter is for obtaining the instance during
a) marshalling,
b) or because of any direct access (from your application).
If the list which is returned of the get- method is a class attribute
it works fine. In my case I create a new list in the method getStyle
and add the content of the differed style lists and in this case it
doesn't work.
I am not sure I fully understand what you are trying to say. Can you
elaborate, please, maybe including some code fragments to highlight the
problem.
Regards
Werner
Is there any property which I have to set or what is the trick?
Regards
Thomas
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email