tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francois Armand (JIRA)" <...@tapestry.apache.org>
Subject [jira] Created: (TAPESTRY-1718) Add a Tree component in corelib
Date Fri, 24 Aug 2007 08:44:30 GMT
Add a Tree component in corelib

                 Key: TAPESTRY-1718
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1718
             Project: Tapestry
          Issue Type: New Feature
          Components: Core Components
    Affects Versions: 5.0.5
            Reporter: Francois Armand

There is no recursion available for template, and one of the most common use case of recursion
is tree structure traversal.
it would be _great_ if the core component library include a Tree component.

I have an example tree component here :
And an example of use :

Basically, the component take a DefaultMutableTreeNode as parameter and print it in a preorder
traversal, and one can specify a (unique) html element as a level separator. But this component
remains really simple and limited.
Moreover, as I'm a beginner with Tapestry, it could be totally not idiomatic of the framework
use (I try to base my implementation on "loop" component).

But it handles the most important functional requirement I want to see for this component.
So, that is my (very basic) "wish list" for a tree component :
- the component traverse a Tree given in parameter
  * DefaultMutableTreeNode may be used for the Java representation for the tree ;
  * let the possibility to configure the traversal order, preorder is a good default ;
- each iteration gives access to the current node ;
- the body render for each ieration is free (as in loop) ;
- "level" can be decorated (a tag or list of tag open before the level, closed after) ;
There is surely others things to add ;)

hope it will gives you other ideas !


This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message