Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.15
    • Fix Version/s: 5.3
    • Component/s: None
    • Labels:
      None

      Description

      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 :
      http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/interldap/interldap-wui-t5/trunk/src/main/java/org/interldap/wui/tapestry/components/Tree.java?view=markup&rev=97
      And an example of use :
      http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/interldap/interldap-wui-t5/trunk/src/t5-test/resources/org/interldap/wui/tapestry/pages/TestTree.html?view=markup&rev=139

      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 !

      Francois

        Activity

        Francois Armand created issue -
        Hide
        Francois Armand added a comment -

        Several other users have build the same kind of component, especially to deals with "folder" structure. Some wiki entries refer to such work :
        http://wiki.apache.org/tapestry/Tapestry5TreeComponent
        http://wiki.apache.org/tapestry/Tapestry5HowToCreateYourOwnComponents

        Show
        Francois Armand added a comment - Several other users have build the same kind of component, especially to deals with "folder" structure. Some wiki entries refer to such work : http://wiki.apache.org/tapestry/Tapestry5TreeComponent http://wiki.apache.org/tapestry/Tapestry5HowToCreateYourOwnComponents
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Fix Version/s 5.1 [ 12312964 ]
        Howard M. Lewis Ship made changes -
        Affects Version/s 5.0.5 [ 12312477 ]
        Project Tapestry [ 10573 ] Tapestry 5 [ 12310833 ]
        Component/s Core Components [ 12311677 ]
        Fix Version/s 5.1 [ 12312964 ]
        Issue Type New Feature [ 2 ] Bug [ 1 ]
        Key TAPESTRY-1718 TAP5-71
        Howard M. Lewis Ship made changes -
        Affects Version/s 5.0.15 [ 12313429 ]
        Howard M. Lewis Ship made changes -
        Issue Type Bug [ 1 ] New Feature [ 2 ]
        Igor Drobiazko made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        Igor Drobiazko made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 5.3.0 [ 12316023 ]
        Resolution Fixed [ 1 ]
        Howard M. Lewis Ship made changes -
        Fix Version/s 5.3 [ 12316024 ]
        Fix Version/s 5.3.0 [ 12316023 ]

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Francois Armand
          • Votes:
            9 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development