Hi All,

I built a tree component that has a server side action handling.

I want to submit the tree in the contrib library, and I would like to know
what the comunity thinks about it.

I think the most important features of the tree component are:
        - suports a tree node view polymorphism (different view for different types
of objects)
        - suports a custom action handling (for exmaple, if you implement a
explorer web application, you can have a tree and a table, and if a user
clicks on a tree node, the table could change its state)
        - dividing the tree data model (data structure) and the tree state model (a
set of expanded nodes, and a collection of selected nodes).

The tree structure is:
        Model Structure:
                I divided the tree data and tree state in different interfaces.
                1. ITreeDataModel - a class that contains the tree structure in the 
form
of data objects.
                2. ITreeStateModel - a class that contains a tree state - a Set of
expanded nodes; last selected node; and has functions to expand and collapse
a node.
                3. ITreeModel - a class that contains the above 2 classes.
                4. ITreeSessionStateManager - a class that determines what data will be
stored in the session. There are two default implementations of this
interface in the package net.sf.tapestry.contrib.tree.simple.
                5. ISessionStoreManager - a class that determines where to store the
session data.
                6. ITreeNodeRenderFactory - a class that returns a different IRender 
for a
particular node type (allows polymorphism).

        View structure:
                1. TreeNodeView.jwc - a component that displays a node. It takes a
parameter INodeRenderFactory (not required) and can get from it a custom
node presentation as an IRender. TreeNodeView can make a direct link that
may or may not surround a custom node presentation. The node can show the
default node images ('+' or '-' image) or you can specify custom node
images. To support a custom action hadling you must supply a
ITreeNodeRenderFactory.
                2. TreeDataView.jwc - a component that takes a tree data model and 
renders
every node that is in the expanded set in ITreeStateModel. This component
wraps a TreeNodeView.
                3. TreeView.jwc - the root component of the tree. It takes the 
following
parameters: ITreeModel - required; nonrequired - ITreeSessionManager,
ISessonStoreManager.
                4. TreeHeaders.jwc - I think at the moment it isn't necessary, but it 
can
contain a function to minimize and maximize the tree view, sorting
manupulation (I don't know if this is necessary) and so on ...

Please visit http://tree.rushmore-digital.com to see the tree demo.
You can download the source code from
http://tree.rushmore-digital.com/tree.zip.

Best regards
Tsvetelin Saykov



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to