Tapestry 5
  1. Tapestry 5
  2. TAP5-739

Allow recursion of a component within itself

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Ideally, Tapestry would allow a component to be nested within itself.

      Because recursion of a component within itself is not possible, it is very difficult to represent a tree structure, which a component representing each node of the tree.

        Activity

        Hide
        Thiago H. de Paula Figueiredo added a comment -

        This can't be implemented in Tapestry without rewriting it from scratch. Read the "Principle 1 – Static Structure, Dynamic Behavior" section of http://tapestry.apache.org/tapestry5.1/ to know why. Summary: Tapestry has a static tree of components, and allowing recursion in templates needs dynamic instantiation of components.

        By the way, it's not hard to render trees or tree-like structures inside a component: just render everything in code. One example: http://ars-machina.svn.sourceforge.net/viewvc/ars-machina/tapestry-crud/branches/1.1/src/main/java/br/com/arsmachina/tapestrycrud/components/TreeSelect.java?revision=595&view=markup.

        Show
        Thiago H. de Paula Figueiredo added a comment - This can't be implemented in Tapestry without rewriting it from scratch. Read the "Principle 1 – Static Structure, Dynamic Behavior" section of http://tapestry.apache.org/tapestry5.1/ to know why. Summary: Tapestry has a static tree of components, and allowing recursion in templates needs dynamic instantiation of components. By the way, it's not hard to render trees or tree-like structures inside a component: just render everything in code. One example: http://ars-machina.svn.sourceforge.net/viewvc/ars-machina/tapestry-crud/branches/1.1/src/main/java/br/com/arsmachina/tapestrycrud/components/TreeSelect.java?revision=595&view=markup .

          People

          • Assignee:
            Unassigned
            Reporter:
            Seth Call
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development