You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Ted Jones <Tj...@metamatrix.com> on 2005/01/08 00:21:15 UTC

Tree Requires all Objects to be Serializable

I am using the tree from the contrib lib. I have slightly modified it to
store an object on each node. It seems all objects and their imported
objects need to be serializable since I am receiving a
java.io.NotSerializableException on an imported object. This is a shared
object and I would prefer not to have to make it serializable. I am using
Tomcat 5.0 and Tapestry 3.0. Is there some way around this?
 
Thanks...
Ted

Re: Tree Requires all Objects to be Serializable

Posted by Tsvetelin Saykov <ts...@rushmore-digital.com>.
Hi Ted,

By default the use FullTreeStateManager, class determine which data from
model will be stored in session. You can write your own TreeStateManager
that will store only the TreeStateModel(that contains only node IDs) in
session and will build the data model on each request. But in
default/general TreeDataModel the node ID is a TreePath object that contains
a chain of all nodes from root to the current. You should re-write the
default TreeDataModel to return other type on node ID (for example some long
or string property of your node which is unique in all tree structure).

Tsvetelin


----- Original Message -----
From: "Ted Jones" <Tj...@metamatrix.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Saturday, January 08, 2005 1:21 AM
Subject: Tree Requires all Objects to be Serializable


> I am using the tree from the contrib lib. I have slightly modified it to
> store an object on each node. It seems all objects and their imported
> objects need to be serializable since I am receiving a
> java.io.NotSerializableException on an imported object. This is a shared
> object and I would prefer not to have to make it serializable. I am using
> Tomcat 5.0 and Tapestry 3.0. Is there some way around this?
>
> Thanks...
> Ted
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org