Hi Werner,

thank you for your elaboration. I had solved the problem with the last
mail from Ralf.

Your questions:

>> 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.

Now, there is no problem. To understand the answer you have to bear in
mind that I don't know that caster use the get- method to add objects
to a collection if the add- method is not define in the mapping file.

I create an object which has as object attributes three differed lists
to catch the style objects. I believe that castor use the
setStyles(List<Style> l) method to add the list of differed styles to
the object. In this method I spilt the list which is provide from
castor in my three lists which are defined as object attributes.
Furthermore I believe that caster use the getStyle() method to
retrieve the list of styles and I create a new list in this method
which collect the content of the three lists of the object. The reason
why I split the big list in differed list is it easier to handle in
the following work flow.

This is what I would realize.

If the add method is not define in the mapping file castor would use
the getStyle- method to add a new style to the list. But in my case
the list life time run out after the method is worn out. Than castor
would add the new style to a list which is catch by the garbage
collector at the next time and the style would never add to my lists
in the object.

>> I create an object with the setter Methode "setStyles(ArrayList<Style>)".
>Any particular reason as to why you are using an implementation class
>(rather than the interface java.util.List) in your method signature ?

No special reason. ;)


Regards
Thomas

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to