You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Michael Allman <ms...@allman.ms> on 2010/07/20 07:53:38 UTC
SerializationException loading a dictionary
Hi,
Why does the WTKXSerializer throw an exception if the component is an
instance of the Dictionary interface and has static setters? I have a
Component class that implements Dictionary and I can't load instances of
it. I'm just going to disable the check for now.
Cheers,
Michael
Re: SerializationException loading a dictionary
Posted by Michael Allman <ms...@allman.ms>.
On Tue, 20 Jul 2010, Greg Brown wrote:
> That check has been eliminated in 2.0. But I don't recommend
> implementing Dictionary in your Component subclass. That will cause all
> BXML attributes to be processed via the dictionary methods rather than
> BeanAdapter. OTOH, maybe that is the behavior you want.
Not really. I want to use a custom adapter, but I didn't want to go
mucking around in the serializer. Implementing Dictionary seemed like the
path of least resistance.
Michael
Re: SerializationException loading a dictionary
Posted by Greg Brown <gk...@mac.com>.
That check has been eliminated in 2.0. But I don't recommend implementing Dictionary in your Component subclass. That will cause all BXML attributes to be processed via the dictionary methods rather than BeanAdapter. OTOH, maybe that is the behavior you want.
On Jul 20, 2010, at 1:53 AM, Michael Allman wrote:
> Hi,
>
> Why does the WTKXSerializer throw an exception if the component is an instance of the Dictionary interface and has static setters? I have a Component class that implements Dictionary and I can't load instances of it. I'm just going to disable the check for now.
>
> Cheers,
>
> Michael