Hi Shi Ling,

It is possible to serialize controls.   Before serialization you must
invoke the endContext() method on the ControlContainerContext of the
control, now you can serialize / deserialize, and then invoke the
beginContext() method on the ControlContainerContext after the control
has been deserialized.

This is currently the only way to successfully serialize/deserialize controls.

There is an example of how to do this in the Control's DRT tests, take
a look at:

http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/SimpleSerializationTest.java?view=log

The test uses the ControlTestContainerContext but will work when using
other ControlContainerContext's as well.

- Chad

On 10/21/06, 时岭 <[EMAIL PROTECTED]> wrote:
Dear Chad Schoettger:

   i am a .net student from china, i saw your article in
http://mail-archives.apache.org/mod_mbox/beehive-dev/200602.mbox/[EMAIL 
PROTECTED]

   the .net serialization is a big obstacle for me because i must serialize 
kinds
of control an usercontrol which can not be serializable. i read you have
successfully serialized Control and i hope you can send me your complete code,
thank u very much!

   Best Wishes!


                                              Shi Ling ,Zhejiang University,
China





Reply via email to