Viktor Szathmary <phraktle <at> gmail.com> writes: > > first of all i see that in your implementation you have a TreeNode > class.. do you really need this? the idea is that your ContentProvider > implementation should directly expose your domain objects (so you dont > have to create a TreeNode class)...
Your question brings up a deeper question (in my mind, at least). I'm guessing most people look to the FileTree demo as a template on using the Tacos Tree component. Hence, they are bound to mimic the organization of that demo. Does anyone know why the FileTree.page (in Tacos FileTree demo) declares the selectedFile property as persistent = yes? <property-specification name="selectedFile" type="java.io.File" persistent="yes"/> The way I understand Tapestry's handling of persistent page properties, it serializes persistent objects and stores them into HTTP session. And therein lies the problem with using domain objects directly. If I have a domain model with a Parent class that can be composed of many Parent or Child classes (a hierarchy stored as a private List within Parent, perhaps), making this Parent class a "selectedParent" (mimicing the demo) and declaring it persistent would cause a potentially large object graph to be stored into HTTP session. Using simple domain objects directly would work I guess. As you can see, this argument hinges on the apparent necessity for declaring a "selectedFoo" as persistent. Thoughts/comments appreciated. Jijoe --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
